39 config.checkConfigParameter(
"type",
"SMALL_DEFORMATION_NONLOCAL");
40 DBUG(
"Create SmallDeformationNonlocalProcess.");
45 auto const pv_config = config.getConfigSubtree(
"process_variables");
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 =
85 config.getConfigParameter<std::vector<double>>(
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());
102 config.getConfigParameter<
double>(
103 "reference_temperature", std::numeric_limits<double>::quiet_NaN());
105 auto const internal_length =
107 config.getConfigParameter<
double>(
"internal_length");
109 SmallDeformationNonlocalProcessData<DisplacementDim> process_data{
110 materialIDs(mesh), std::move(solid_constitutive_relations),
111 solid_density, specific_body_force,
114 SecondaryVariableCollection secondary_variables;
118 return std::make_unique<SmallDeformationNonlocalProcess<DisplacementDim>>(
119 std::move(
name), mesh, std::move(jacobian_assembler), parameters,
120 integration_order, std::move(process_variables),
121 std::move(process_data), std::move(secondary_variables));
void DBUG(char const *fmt, Args const &... args)
PropertyVector< int > const * materialIDs(Mesh const &mesh)
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)