29namespace LargeDeformation
31template <
int DisplacementDim>
35 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
36 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
37 unsigned const integration_order,
38 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>&&
42 :
Process(std::move(name), mesh, std::move(jacobian_assembler), parameters,
43 integration_order, std::move(process_variables),
44 std::move(secondary_variables)),
45 _process_data(std::move(process_data))
52 const_cast<MeshLib::Mesh&
>(mesh),
"principal_stress_vector_1",
57 const_cast<MeshLib::Mesh&
>(mesh),
"principal_stress_vector_2",
62 const_cast<MeshLib::Mesh&
>(mesh),
"principal_stress_vector_3",
72 DisplacementDim>::getReflectionDataForOutput(),
77template <
int DisplacementDim>
83template <
int DisplacementDim>
87 unsigned const integration_order)
95 auto add_secondary_variable = [&](std::string
const& name,
96 int const num_components,
97 auto get_ip_values_function)
99 _secondary_variables.addSecondaryVariable(
103 std::move(get_ip_values_function)));
108 DisplacementDim>::getReflectionDataForOutput(),
109 _secondary_variables, getExtrapolator(), _local_assemblers);
116 add_secondary_variable);
120 _process_data.solid_materials, _local_assemblers,
121 _integration_point_writer, integration_order);
129 *_local_to_global_index_map);
132template <
int DisplacementDim>
134 double const t,
double const dt, std::vector<GlobalVector*>
const& x,
135 std::vector<GlobalVector*>
const& x_prev,
int const process_id,
138 DBUG(
"Assemble LargeDeformationProcess.");
140 std::vector<NumLib::LocalToGlobalIndexMap const*> dof_table = {
141 _local_to_global_index_map.get()};
145 getActiveElementIDs(), dof_table, t, dt, x, x_prev, process_id, &M, &K,
148 _global_output(t, process_id, M, K, b);
151template <
int DisplacementDim>
154 double const t,
double const dt, std::vector<GlobalVector*>
const& x,
155 std::vector<GlobalVector*>
const& x_prev,
int const process_id,
158 DBUG(
"AssembleWithJacobian LargeDeformationProcess.");
160 std::vector<NumLib::LocalToGlobalIndexMap const*> dof_table = {
161 _local_to_global_index_map.get()};
165 _local_assemblers, getActiveElementIDs(), dof_table, t, dt, x, x_prev,
166 process_id, &b, &Jac);
168 transformVariableFromGlobalVector(b, 0, *_local_to_global_index_map,
169 *_nodal_forces, std::negate<double>());
171 _global_output(t, process_id, b, Jac);
174template <
int DisplacementDim>
176 std::vector<GlobalVector*>
const& x,
177 std::vector<GlobalVector*>
const& x_prev,
double const t,
double const dt,
178 int const process_id)
180 DBUG(
"PostTimestep LargeDeformationProcess.");
181 std::vector<NumLib::LocalToGlobalIndexMap const*> dof_tables;
182 dof_tables.reserve(x.size());
183 std::generate_n(std::back_inserter(dof_tables), x.size(),
184 [&]() { return _local_to_global_index_map.get(); });
188 getActiveElementIDs(), dof_tables, x, x_prev, t, dt, process_id);
191template <
int DisplacementDim>
193 double const t,
double const dt, std::vector<GlobalVector*>
const& x,
196 DBUG(
"Compute the secondary variables for LargeDeformationProcess.");
197 std::vector<NumLib::LocalToGlobalIndexMap const*> dof_tables;
198 dof_tables.reserve(x.size());
199 std::generate_n(std::back_inserter(dof_tables), x.size(),
200 [&]() { return _local_to_global_index_map.get(); });
204 getActiveElementIDs(), dof_tables, t, dt, x, x_prev, process_id);
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Global vector based on Eigen vector.
bool isAxiallySymmetric() const
std::vector< Element * > const & getElements() const
Get the element-vector for the mesh.
Properties & getProperties()
virtual void postTimestep(std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, double const t, double const dt, int const process_id)
virtual void computeSecondaryVariable(std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, double const t, double const dt, std::vector< GlobalVector * > const &x, GlobalVector const &x_prev, int const process_id)
virtual void initialize(std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table)
std::vector< std::unique_ptr< MeshLib::IntegrationPointWriter > > _integration_point_writer
Handles configuration of several secondary variables from the project file.
void assemble(std::size_t const mesh_item_id, LocalAssemblerInterface &local_assembler, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, double const t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id, GlobalMatrix *M, GlobalMatrix *K, GlobalVector *b)
void assembleWithJacobian(std::size_t const mesh_item_id, LocalAssemblerInterface &local_assembler, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, const double t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id, GlobalVector *b, GlobalMatrix *Jac)
PropertyVector< T > * getOrCreateMeshProperty(Mesh &mesh, std::string const &property_name, MeshItemType const item_type, int const number_of_components)
void addReflectedSecondaryVariables(ReflData const &reflection_data, SecondaryVariableCollection &secondary_variables, NumLib::Extrapolator &extrapolator, std::vector< std::unique_ptr< LocAsmIF > > const &local_assemblers)
void addReflectedIntegrationPointWriters(ReflData const &reflection_data, std::vector< std::unique_ptr< MeshLib::IntegrationPointWriter > > &integration_point_writers, unsigned const integration_order, std::vector< std::unique_ptr< LocAsmIF > > const &local_assemblers)
void computeCellAverages(CellAverageData &cell_average_data, std::vector< std::unique_ptr< LAIntf > > const &local_assemblers)
SecondaryVariableFunctions makeExtrapolator(const unsigned num_components, NumLib::Extrapolator &extrapolator, LocalAssemblerCollection const &local_assemblers, typename NumLib::ExtrapolatableLocalAssemblerCollection< LocalAssemblerCollection >::IntegrationPointValuesMethod integration_point_values_method)
void setIPDataInitialConditions(std::vector< std::unique_ptr< MeshLib::IntegrationPointWriter > > const &_integration_point_writer, MeshLib::Properties const &mesh_properties, LocalAssemblersVector &local_assemblers)
static void executeSelectedMemberOnDereferenced(Method method, Container const &container, std::vector< std::size_t > const &active_container_ids, Args &&... args)
static void executeSelectedMemberDereferenced(Object &object, Method method, Container const &container, std::vector< std::size_t > const &active_container_ids, Args &&... args)
static void executeMemberOnDereferenced(Method method, Container const &container, Args &&... args)