OGS
TH2MProcess.h
Go to the documentation of this file.
1
11#pragma once
12
15#include "ProcessLib/Process.h"
16#include "TH2MProcessData.h"
17
18namespace ProcessLib
19{
20namespace TH2M
21{
22template <int DisplacementDim>
24
27template <int DisplacementDim>
28class TH2MProcess final : public Process,
29 private AssemblyMixin<TH2MProcess<DisplacementDim>>
30{
31 friend class AssemblyMixin<TH2MProcess<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:
70 void constructDofTable() override;
71
73 NumLib::LocalToGlobalIndexMap const& dof_table,
74 MeshLib::Mesh const& mesh,
75 unsigned const integration_order) override;
76
78 std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const&
79 media) override;
80
81 void setInitialConditionsConcreteProcess(std::vector<GlobalVector*>& x,
82 double const t,
83 int const process_id) override;
84
85 void assembleConcreteProcess(const double t, double const dt,
86 std::vector<GlobalVector*> const& x,
87 std::vector<GlobalVector*> const& x_prev,
88 int const process_id, GlobalMatrix& M,
89 GlobalMatrix& K, GlobalVector& b) override;
90
92 const double t, double const dt, std::vector<GlobalVector*> const& x,
93 std::vector<GlobalVector*> const& x_prev, int const process_id,
94 GlobalVector& b, GlobalMatrix& Jac) override;
95
96 void preTimestepConcreteProcess(std::vector<GlobalVector*> const& x,
97 double const t, double const dt,
98 const int process_id) override;
99
100 void postTimestepConcreteProcess(std::vector<GlobalVector*> const& x,
101 std::vector<GlobalVector*> const& x_prev,
102 const double t, const double dt,
103 int const /*process_id*/) override;
104
106 const int process_id) const override;
107
108 std::vector<std::vector<std::string>> initializeAssemblyOnSubmeshes(
109 std::vector<std::reference_wrapper<MeshLib::Mesh>> const& meshes)
110 override;
111
112private:
113 std::vector<MeshLib::Node*> _base_nodes;
114 std::unique_ptr<MeshLib::MeshSubset const> _mesh_subset_base_nodes;
116
117 std::vector<std::unique_ptr<LocalAssemblerInterface<DisplacementDim>>>
119
120 std::unique_ptr<NumLib::LocalToGlobalIndexMap>
122
125 std::unique_ptr<NumLib::LocalToGlobalIndexMap>
127
131
132 void computeSecondaryVariableConcrete(double const t, double const dt,
133 std::vector<GlobalVector*> const& x,
134 GlobalVector const& x_prev,
135 const int process_id) override;
139 std::tuple<NumLib::LocalToGlobalIndexMap*, bool>
140 getDOFTableForExtrapolatorData() const override;
141
145 bool hasMechanicalProcess(int const process_id) const
146 {
147 return _use_monolithic_scheme || process_id == deformation_process_id;
148 }
149
150 static constexpr int monolithic_process_id = 0;
151 static constexpr int deformation_process_id = 3;
152
153 // number of per_process_variable_components
154 static constexpr int n_gas_pressure_components = 1;
155 static constexpr int n_capillary_pressure_components = 1;
156 static constexpr int n_temperature_components = 1;
157 static constexpr int n_displacement_components = DisplacementDim;
158};
159
160extern template class TH2MProcess<2>;
161extern template class TH2MProcess<3>;
162
163} // namespace TH2M
164} // namespace ProcessLib
MathLib::SparsityPattern< GlobalIndexType > GlobalSparsityPattern
Global vector based on Eigen vector.
Definition EigenVector.h:25
std::string const name
Definition Process.h:362
const bool _use_monolithic_scheme
Definition Process.h:379
Handles configuration of several secondary variables from the project file.
std::unique_ptr< NumLib::LocalToGlobalIndexMap > _local_to_global_index_map_single_component
static constexpr int monolithic_process_id
void postTimestepConcreteProcess(std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, const double t, const double dt, int const) override
bool isLinear() const override
std::tuple< NumLib::LocalToGlobalIndexMap *, bool > getDOFTableForExtrapolatorData() const override
void assembleWithJacobianConcreteProcess(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) override
void setInitialConditionsConcreteProcess(std::vector< GlobalVector * > &x, double const t, int const process_id) override
bool hasMechanicalProcess(int const process_id) const
TH2MProcess(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, TH2MProcessData< DisplacementDim > &&process_data, SecondaryVariableCollection &&secondary_variables, bool const use_monolithic_scheme)
static constexpr int n_temperature_components
void preTimestepConcreteProcess(std::vector< GlobalVector * > const &x, double const t, double const dt, const int process_id) override
MathLib::MatrixSpecifications getMatrixSpecifications(const int process_id) const override
void initializeBoundaryConditions(std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media) override
static constexpr int n_displacement_components
TH2MProcessData< DisplacementDim > _process_data
GlobalSparsityPattern _sparsity_pattern_with_linear_element
std::vector< MeshLib::Node * > _base_nodes
void computeSecondaryVariableConcrete(double const t, double const dt, std::vector< GlobalVector * > const &x, GlobalVector const &x_prev, const int process_id) override
void assembleConcreteProcess(const double 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) override
static constexpr int n_gas_pressure_components
void constructDofTable() override
NumLib::LocalToGlobalIndexMap const & getDOFTable(const int process_id) const 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
std::unique_ptr< MeshLib::MeshSubset const > _mesh_subset_base_nodes
static constexpr int n_capillary_pressure_components
void initializeConcreteProcess(NumLib::LocalToGlobalIndexMap const &dof_table, MeshLib::Mesh const &mesh, unsigned const integration_order) override
Process specific initialization called by initialize().
static constexpr int deformation_process_id
std::vector< std::unique_ptr< LocalAssemblerInterface< DisplacementDim > > > local_assemblers_