325 int const displacement_dim,
326 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
328 bool const library_path_is_relative_to_prj_file)
330 INFO(
"### MFRONT ########################################################");
335 auto const library_name =
338 auto const lib_path =
339 library_name ? (library_path_is_relative_to_prj_file
343 :
"libOgsMFrontBehaviour";
345 mgis::behaviour::Hypothesis hypothesis;
346 if (displacement_dim == 2)
350 "The model is defined in 2D. On the material level currently a "
351 "plane strain setting is used. In particular it is not checked if "
352 "axial symmetry or plane stress are assumed. Special material "
353 "behaviour for these settings is currently not supported.");
354 hypothesis = mgis::behaviour::Hypothesis::PLANESTRAIN;
356 else if (displacement_dim == 3)
358 hypothesis = mgis::behaviour::Hypothesis::TRIDIMENSIONAL;
362 OGS_FATAL(
"Displacement dim {} is not supported.", displacement_dim);
365 auto behaviour = loadBehaviour(
371 INFO(
"Behaviour: `{:s}'.", behaviour.behaviour);
372 INFO(
"Hypothesis: `{:s}'.", mgis::behaviour::toString(hypothesis));
373 INFO(
"Source: `{:s}'.", behaviour.source);
374 INFO(
"TFEL version: `{:s}'.", behaviour.tfel_version);
375 INFO(
"Behaviour type: `{:s}'.", btypeToString(behaviour.btype));
376 INFO(
"Kinematic: `{:s}'.", toString(behaviour.kinematic));
377 INFO(
"Symmetry: `{:s}'.", toString(behaviour.symmetry));
379 varInfo(
"Mat. props.", behaviour.mps, hypothesis);
380 varInfo(
"Gradients", behaviour.gradients, hypothesis);
381 varInfo(
"Thdyn. forces", behaviour.thermodynamic_forces, hypothesis);
382 varInfo(
"Int. StVars.", behaviour.isvs, hypothesis);
383 varInfo(
"Ext. StVars.", behaviour.esvs, hypothesis);
387 varInfo(
"Real-valued parameters", behaviour.params);
388 varInfo(
"Integer parameters", behaviour.iparams);
389 varInfo(
"Unsigned parameters", behaviour.usparams);
391 INFO(
"#Tangent operator blocks: {}.", behaviour.to_blocks.size());
392 for (
auto const& [var1, var2] : behaviour.to_blocks)
394 INFO(
" --> ({}, {}).", var1.name, var2.name);
397 std::vector<ParameterLib::Parameter<double>
const*> material_properties =
398 readMaterialProperties(behaviour, hypothesis, parameters, config);
400 std::map<std::string, ParameterLib::Parameter<double>
const*>
401 state_variables_initial_properties =
402 readStateVariablesInitialValueProperties(behaviour, hypothesis,
405 INFO(
"### MFRONT END ####################################################");
407 return {std::move(behaviour), std::move(material_properties),
408 std::move(state_variables_initial_properties)};
std::map< std::string, ParameterLib::Parameter< double > const * > readStateVariablesInitialValueProperties(mgis::behaviour::Behaviour const &behaviour, mgis::behaviour::Hypothesis const &hypothesis, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, BaseLib::ConfigTree const &config)