OGS
HydroMechanicsProcess.h
Go to the documentation of this file.
1
11#pragma once
12
16#include "ProcessLib/Process.h"
17
18namespace ProcessLib
19{
20namespace HydroMechanics
21{
26template <int DisplacementDim>
28 : public Process,
29 private AssemblyMixin<HydroMechanicsProcess<DisplacementDim>>
30{
31 friend class AssemblyMixin<HydroMechanicsProcess<DisplacementDim>>;
32
33public:
35 std::string name,
36 MeshLib::Mesh& mesh,
37 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&&
38 jacobian_assembler,
39 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const&
40 parameters,
41 unsigned const integration_order,
42 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>&&
43 process_variables,
45 SecondaryVariableCollection&& secondary_variables,
46 bool const use_monolithic_scheme);
47
50
51 bool isLinear() const override;
53
67 const int process_id) const override;
68
69private:
71
72 void constructDofTable() override;
73
75 NumLib::LocalToGlobalIndexMap const& dof_table,
76 MeshLib::Mesh const& mesh,
77 unsigned const integration_order) override;
78
80 std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const&
81 media) override;
82
83 void assembleConcreteProcess(const double t, double const /*dt*/,
84 std::vector<GlobalVector*> const& x,
85 std::vector<GlobalVector*> const& x_prev,
86 int const process_id, GlobalMatrix& M,
87 GlobalMatrix& K, GlobalVector& b) override;
88
90 const double t, double const /*dt*/,
91 std::vector<GlobalVector*> const& x,
92 std::vector<GlobalVector*> const& x_prev, int const process_id,
93 GlobalVector& b, GlobalMatrix& Jac) override;
94
95 void preTimestepConcreteProcess(std::vector<GlobalVector*> const& x,
96 double const t, double const dt,
97 const int process_id) override;
98
99 void postTimestepConcreteProcess(std::vector<GlobalVector*> const& x,
100 std::vector<GlobalVector*> const& x_prev,
101 const double t, const double dt,
102 int const process_id) override;
103
105 std::vector<GlobalVector*> const& x,
106 std::vector<GlobalVector*> const& x_prev, const double t,
107 double const dt, int const process_id) override;
108
109 void setInitialConditionsConcreteProcess(std::vector<GlobalVector*>& x,
110 double const t,
111 int const process_id) override;
112
114 const int process_id) const override;
115
116 std::vector<std::vector<std::string>> initializeAssemblyOnSubmeshes(
117 std::vector<std::reference_wrapper<MeshLib::Mesh>> const& meshes)
118 override;
119
120 bool isMonolithicSchemeUsed() const override
121 {
122 return process_data_.isMonolithicSchemeUsed();
123 }
124
125private:
126 std::vector<MeshLib::Node*> base_nodes_;
127 std::unique_ptr<MeshLib::MeshSubset const> mesh_subset_base_nodes_;
129
130 std::vector<std::unique_ptr<LocalAssemblerIF>> local_assemblers_;
131
132 std::unique_ptr<NumLib::LocalToGlobalIndexMap>
134
137 std::unique_ptr<NumLib::LocalToGlobalIndexMap>
139
143
144 void computeSecondaryVariableConcrete(double const t, double const dt,
145 std::vector<GlobalVector*> const& x,
146 GlobalVector const& x_prev,
147 const int process_id) override;
151 std::tuple<NumLib::LocalToGlobalIndexMap*, bool>
152 getDOFTableForExtrapolatorData() const override;
153
157 bool hasMechanicalProcess(int const process_id) const
158 {
159 return process_id == process_data_.mechanics_related_process_id;
160 }
161};
162
163extern template class HydroMechanicsProcess<2>;
164extern template class HydroMechanicsProcess<3>;
165
166} // namespace HydroMechanics
167} // namespace ProcessLib
MathLib::SparsityPattern< GlobalIndexType > GlobalSparsityPattern
Global vector based on Eigen vector.
Definition EigenVector.h:25
std::unique_ptr< MeshLib::MeshSubset const > mesh_subset_base_nodes_
void assembleConcreteProcess(const double t, double const, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id, GlobalMatrix &M, GlobalMatrix &K, GlobalVector &b) override
std::unique_ptr< NumLib::LocalToGlobalIndexMap > local_to_global_index_map_with_base_nodes_
std::vector< std::vector< std::string > > initializeAssemblyOnSubmeshes(std::vector< std::reference_wrapper< MeshLib::Mesh > > const &meshes) override
HydroMechanicsProcess(std::string name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, unsigned const integration_order, std::vector< std::vector< std::reference_wrapper< ProcessVariable > > > &&process_variables, HydroMechanicsProcessData< DisplacementDim > &&process_data, SecondaryVariableCollection &&secondary_variables, bool const use_monolithic_scheme)
void computeSecondaryVariableConcrete(double const t, double const dt, std::vector< GlobalVector * > const &x, GlobalVector const &x_prev, const int process_id) override
void preTimestepConcreteProcess(std::vector< GlobalVector * > const &x, double const t, double const dt, const int process_id) override
void initializeBoundaryConditions(std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media) override
NumLib::LocalToGlobalIndexMap const & getDOFTable(const int process_id) const override
void assembleWithJacobianConcreteProcess(const double t, double const, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id, GlobalVector &b, GlobalMatrix &Jac) override
std::unique_ptr< NumLib::LocalToGlobalIndexMap > local_to_global_index_map_single_component_
void postNonLinearSolverConcreteProcess(std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, const double t, double const dt, int const process_id) override
void setInitialConditionsConcreteProcess(std::vector< GlobalVector * > &x, double const t, int const process_id) override
MathLib::MatrixSpecifications getMatrixSpecifications(const int process_id) const override
std::vector< std::unique_ptr< LocalAssemblerIF > > local_assemblers_
HydroMechanicsProcessData< DisplacementDim > process_data_
void initializeConcreteProcess(NumLib::LocalToGlobalIndexMap const &dof_table, MeshLib::Mesh const &mesh, unsigned const integration_order) override
Process specific initialization called by initialize().
std::tuple< NumLib::LocalToGlobalIndexMap *, bool > getDOFTableForExtrapolatorData() const override
void postTimestepConcreteProcess(std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, const double t, const double dt, int const process_id) override
std::string const name
Definition Process.h:362
Handles configuration of several secondary variables from the project file.