325 int const displacement_dim,
326 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
329 INFO(
"### MFRONT ########################################################");
337 bool const library_path_is_relative_to_prj_file =
343 library->getConfigAttribute(
"path_is_relative_to_prj_file",
true);
345 std::string
const library_name =
346 library ? library->getValue<std::string>() :
"libOgsMFrontBehaviour";
348 auto const lib_path =
349 library_path_is_relative_to_prj_file
353 mgis::behaviour::Hypothesis hypothesis;
354 if (displacement_dim == 2)
358 "The model is defined in 2D. On the material level currently a "
359 "plane strain setting is used. In particular it is not checked if "
360 "axial symmetry or plane stress are assumed. Special material "
361 "behaviour for these settings is currently not supported.");
362 hypothesis = mgis::behaviour::Hypothesis::PLANESTRAIN;
364 else if (displacement_dim == 3)
366 hypothesis = mgis::behaviour::Hypothesis::TRIDIMENSIONAL;
370 OGS_FATAL(
"Displacement dim {} is not supported.", displacement_dim);
373 auto behaviour = loadBehaviour(
379 INFO(
"Behaviour: `{:s}'.", behaviour.behaviour);
380 INFO(
"Hypothesis: `{:s}'.", mgis::behaviour::toString(hypothesis));
381 INFO(
"Source: `{:s}'.", behaviour.source);
382 INFO(
"TFEL version: `{:s}'.", behaviour.tfel_version);
383 INFO(
"Behaviour type: `{:s}'.", btypeToString(behaviour.btype));
384 INFO(
"Kinematic: `{:s}'.", toString(behaviour.kinematic));
385 INFO(
"Symmetry: `{:s}'.", toString(behaviour.symmetry));
387 varInfo(
"Mat. props.", behaviour.mps, hypothesis);
388 varInfo(
"Gradients", behaviour.gradients, hypothesis);
389 varInfo(
"Thdyn. forces", behaviour.thermodynamic_forces, hypothesis);
390 varInfo(
"Int. StVars.", behaviour.isvs, hypothesis);
391 varInfo(
"Ext. StVars.", behaviour.esvs, hypothesis);
395 varInfo(
"Real-valued parameters", behaviour.params);
396 varInfo(
"Integer parameters", behaviour.iparams);
397 varInfo(
"Unsigned parameters", behaviour.usparams);
399 INFO(
"#Tangent operator blocks: {}.", behaviour.to_blocks.size());
400 for (
auto const& [var1, var2] : behaviour.to_blocks)
402 INFO(
" --> ({}, {}).", var1.name, var2.name);
405 std::vector<ParameterLib::Parameter<double>
const*> material_properties =
406 readMaterialProperties(behaviour, hypothesis, parameters, config);
408 std::map<std::string, ParameterLib::Parameter<double>
const*>
409 state_variables_initial_properties =
410 readStateVariablesInitialValueProperties(behaviour, hypothesis,
413 INFO(
"### MFRONT END ####################################################");
415 return {std::move(behaviour), std::move(material_properties),
416 std::move(state_variables_initial_properties)};
OGS_NO_DANGLING Parameter< ParameterDataType > & findParameter(std::string const ¶meter_name, std::vector< std::unique_ptr< ParameterBase > > const ¶meters, int const num_components, MeshLib::Mesh const *const mesh=nullptr)
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)