24 namespace SmallDeformation
26 template <
int DisplacementDim>
30 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
31 std::vector<ProcessVariable>
const& variables,
32 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
33 std::optional<ParameterLib::CoordinateSystem>
const&
34 local_coordinate_system,
35 unsigned const integration_order,
40 DBUG(
"Create SmallDeformationProcess.");
52 DBUG(
"Associate displacement with process variable '{:s}'.",
53 per_process_variables.back().get().getName());
55 if (per_process_variables.back().get().getNumberOfGlobalComponents() !=
59 "Number of components of the process variable '{:s}' is different "
60 "from the displacement dimension: got {:d}, expected {:d}",
61 per_process_variables.back().get().getName(),
62 per_process_variables.back().get().getNumberOfGlobalComponents(),
65 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
67 process_variables.push_back(std::move(per_process_variables));
69 auto solid_constitutive_relations =
70 MaterialLib::Solids::createConstitutiveRelations<DisplacementDim>(
71 parameters, local_coordinate_system, config);
74 auto const& solid_density = ParameterLib::findParameter<double>(
77 "solid_density", parameters, 1, &mesh);
78 DBUG(
"Use '{:s}' as solid density parameter.", solid_density.name);
81 Eigen::Matrix<double, DisplacementDim, 1> specific_body_force;
83 std::vector<double>
const b =
86 "specific_body_force");
87 if (b.size() != DisplacementDim)
90 "The size of the specific body force vector does not match the "
91 "displacement dimension. Vector size is {:d}, displacement "
93 b.size(), DisplacementDim);
96 std::copy_n(b.data(), b.size(), specific_body_force.data());
103 config,
"reference_temperature", parameters, 1, &mesh);
106 DBUG(
"Use '{:s}' as reference temperature parameter.",
107 (*reference_temperature).name);
111 auto const initial_stress = ParameterLib::findOptionalTagParameter<double>(
113 config,
"initial_stress", parameters,
119 materialIDs(mesh), std::move(solid_constitutive_relations),
120 initial_stress, solid_density,
127 return std::make_unique<SmallDeformationProcess<DisplacementDim>>(
128 std::move(
name), mesh, std::move(jacobian_assembler), parameters,
129 integration_order, std::move(process_variables),
130 std::move(process_data), std::move(secondary_variables));
136 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
137 std::vector<ProcessVariable>
const& variables,
138 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
139 std::optional<ParameterLib::CoordinateSystem>
const&
140 local_coordinate_system,
141 unsigned const integration_order,
147 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
148 std::vector<ProcessVariable>
const& variables,
149 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
150 std::optional<ParameterLib::CoordinateSystem>
const&
151 local_coordinate_system,
152 unsigned const integration_order,
void DBUG(char const *fmt, Args const &... args)
void checkConfigParameter(std::string const ¶m, T const &value) const
T getConfigParameter(std::string const ¶m) const
ConfigTree getConfigSubtree(std::string const &root) const
Handles configuration of several secondary variables from the project file.
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.
PropertyVector< int > const * materialIDs(Mesh const &mesh)
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)