25namespace LargeDeformation
27template <
int DisplacementDim>
31 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
32 std::vector<ProcessVariable>
const& variables,
33 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
34 std::optional<ParameterLib::CoordinateSystem>
const&
35 local_coordinate_system,
36 unsigned const integration_order,
38 std::map<
int, std::shared_ptr<MaterialPropertyLib::Medium>>
const& media)
42 DBUG(
"Create LargeDeformationProcess.");
55 DBUG(
"Associate displacement with process variable '{:s}'.",
56 per_process_variables.back().get().getName());
58 if (per_process_variables.back().get().getNumberOfGlobalComponents() !=
62 "Number of components of the process variable '{:s}' is different "
63 "from the displacement dimension: got {:d}, expected {:d}",
64 per_process_variables.back().get().getName(),
65 per_process_variables.back().get().getNumberOfGlobalComponents(),
68 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
70 process_variables.push_back(std::move(per_process_variables));
73 auto solid_constitutive_relations =
76 parameters, local_coordinate_system, materialIDs(mesh), config);
79 Eigen::Matrix<double, DisplacementDim, 1> specific_body_force;
81 std::vector<double>
const b =
84 "specific_body_force");
85 if (b.size() != DisplacementDim)
88 "The size of the specific body force vector does not match the "
89 "displacement dimension. Vector size is {:d}, displacement "
91 b.size(), DisplacementDim);
94 std::copy_n(b.data(), b.size(), specific_body_force.data());
104 config,
"reference_temperature", parameters, 1, &mesh);
105 if (reference_temperature)
107 DBUG(
"Use '{:s}' as reference temperature parameter.",
108 (*reference_temperature).name);
112 auto const initial_stress = ParameterLib::findOptionalTagParameter<double>(
114 config,
"initial_stress", parameters,
121 std::move(media_map),
122 std::move(solid_constitutive_relations),
125 reference_temperature};
131 return std::make_unique<LargeDeformationProcess<DisplacementDim>>(
132 std::move(name), mesh, std::move(jacobian_assembler), parameters,
133 integration_order, std::move(process_variables),
134 std::move(process_data), std::move(secondary_variables));
140 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
141 std::vector<ProcessVariable>
const& variables,
142 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
143 std::optional<ParameterLib::CoordinateSystem>
const&
144 local_coordinate_system,
145 unsigned const integration_order,
147 std::map<
int, std::shared_ptr<MaterialPropertyLib::Medium>>
const& media);
152 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
153 std::vector<ProcessVariable>
const& variables,
154 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
155 std::optional<ParameterLib::CoordinateSystem>
const&
156 local_coordinate_system,
157 unsigned const integration_order,
159 std::map<
int, std::shared_ptr<MaterialPropertyLib::Medium>>
const& media);
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
T getConfigParameter(std::string const ¶m) const
ConfigTree getConfigSubtree(std::string const &root) const
void checkConfigParameter(std::string const ¶m, std::string_view const value) const
Handles configuration of several secondary variables from the project file.
MaterialSpatialDistributionMap createMaterialSpatialDistributionMap(std::map< int, std::shared_ptr< Medium > > const &media, MeshLib::Mesh const &mesh)
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.
Parameter< ParameterDataType > * findOptionalTagParameter(BaseLib::ConfigTree const &process_config, std::string const &tag, std::vector< std::unique_ptr< ParameterBase > > const ¶meters, int const num_components, MeshLib::Mesh const *const mesh=nullptr)
std::vector< std::reference_wrapper< ProcessVariable > > findProcessVariables(std::vector< ProcessVariable > const &variables, BaseLib::ConfigTree const &pv_config, std::initializer_list< std::string > tags)
void createSecondaryVariables(BaseLib::ConfigTree const &config, SecondaryVariableCollection &secondary_variables)