327 int const displacement_dim,
328 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
331 INFO(
"### MFRONT ########################################################");
339 bool const library_path_is_relative_to_prj_file =
345 library->getConfigAttribute(
"path_is_relative_to_prj_file",
true);
347 std::string
const library_name =
348 library ? library->getValue<std::string>() :
"libOgsMFrontBehaviour";
350 auto const lib_path =
351 library_path_is_relative_to_prj_file
355 mgis::behaviour::Hypothesis hypothesis;
356 if (displacement_dim == 2)
360 "The model is defined in 2D. On the material level currently a "
361 "plane strain setting is used. In particular it is not checked if "
362 "axial symmetry or plane stress are assumed. Special material "
363 "behaviour for these settings is currently not supported.");
364 hypothesis = mgis::behaviour::Hypothesis::PLANESTRAIN;
366 else if (displacement_dim == 3)
368 hypothesis = mgis::behaviour::Hypothesis::TRIDIMENSIONAL;
372 OGS_FATAL(
"Displacement dim {} is not supported.", displacement_dim);
375 auto behaviour = loadBehaviour(
381 INFO(
"Behaviour: `{:s}'.", behaviour.behaviour);
382 INFO(
"Hypothesis: `{:s}'.", mgis::behaviour::toString(hypothesis));
383 INFO(
"Source: `{:s}'.", behaviour.source);
384 INFO(
"TFEL version: `{:s}'.", behaviour.tfel_version);
385 INFO(
"Behaviour type: `{:s}'.", btypeToString(behaviour.btype));
386 INFO(
"Kinematic: `{:s}'.", toString(behaviour.kinematic));
387 INFO(
"Symmetry: `{:s}'.", toString(behaviour.symmetry));
389 varInfo(
"Mat. props.", behaviour.mps, hypothesis);
390 varInfo(
"Gradients", behaviour.gradients, hypothesis);
391 varInfo(
"Thdyn. forces", behaviour.thermodynamic_forces, hypothesis);
392 varInfo(
"Int. StVars.", behaviour.isvs, hypothesis);
393 varInfo(
"Ext. StVars.", behaviour.esvs, hypothesis);
397 varInfo(
"Real-valued parameters", behaviour.params);
398 varInfo(
"Integer parameters", behaviour.iparams);
399 varInfo(
"Unsigned parameters", behaviour.usparams);
401 INFO(
"#Tangent operator blocks: {}.", behaviour.to_blocks.size());
402 for (
auto const& [var1, var2] : behaviour.to_blocks)
404 INFO(
" --> ({}, {}).", var1.name, var2.name);
407 std::vector<ParameterLib::Parameter<double>
const*> material_properties =
408 readMaterialProperties(behaviour, hypothesis, parameters, config);
410 std::map<std::string, ParameterLib::Parameter<double>
const*>
411 state_variables_initial_properties =
412 readStateVariablesInitialValueProperties(behaviour, hypothesis,
415 INFO(
"### MFRONT END ####################################################");
417 return {std::move(behaviour), std::move(material_properties),
418 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)