OGS
HydroMechanicsProcess.h
Go to the documentation of this file.
1 
11 #pragma once
12 
13 #include "ProcessLib/Process.h"
16 
17 namespace ProcessLib
18 {
19 namespace HydroMechanics
20 {
25 template <int DisplacementDim>
26 class HydroMechanicsProcess final : public Process
27 {
28 public:
30  std::string name,
31  MeshLib::Mesh& mesh,
32  std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&&
33  jacobian_assembler,
34  std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const&
35  parameters,
36  unsigned const integration_order,
37  std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>&&
38  process_variables,
40  SecondaryVariableCollection&& secondary_variables,
41  bool const use_monolithic_scheme);
42 
45 
46  bool isLinear() const override;
48 
62  const int process_id) const override;
63 
64 private:
66 
67  void constructDofTable() override;
68 
70  NumLib::LocalToGlobalIndexMap const& dof_table,
71  MeshLib::Mesh const& mesh,
72  unsigned const integration_order) override;
73 
74  void initializeBoundaryConditions() override;
75 
76  void assembleConcreteProcess(const double t, double const /*dt*/,
77  std::vector<GlobalVector*> const& x,
78  std::vector<GlobalVector*> const& xdot,
79  int const process_id, GlobalMatrix& M,
80  GlobalMatrix& K, GlobalVector& b) override;
81 
83  const double t, double const /*dt*/,
84  std::vector<GlobalVector*> const& x,
85  std::vector<GlobalVector*> const& xdot, int const process_id,
87  GlobalMatrix& Jac) override;
88 
89  void preTimestepConcreteProcess(std::vector<GlobalVector*> const& x,
90  double const t, double const dt,
91  const int process_id) override;
92 
93  void postTimestepConcreteProcess(std::vector<GlobalVector*> const& x,
94  const double t, const double dt,
95  int const process_id) override;
96 
98  GlobalVector const& xdot,
99  const double t, double const dt,
100  int const process_id) override;
101 
102  void setInitialConditionsConcreteProcess(std::vector<GlobalVector*>& x,
103  double const t,
104  int const process_id) override;
105 
107  const int process_id) const override;
108 
109 private:
110  std::vector<MeshLib::Node*> _base_nodes;
111  std::unique_ptr<MeshLib::MeshSubset const> _mesh_subset_base_nodes;
113 
114  std::vector<std::unique_ptr<LocalAssemblerIF>> _local_assemblers;
115 
116  std::unique_ptr<NumLib::LocalToGlobalIndexMap>
118 
121  std::unique_ptr<NumLib::LocalToGlobalIndexMap>
123 
127 
128  void computeSecondaryVariableConcrete(double const t, double const dt,
129  std::vector<GlobalVector*> const& x,
130  GlobalVector const& x_dot,
131  const int process_id) override;
135  std::tuple<NumLib::LocalToGlobalIndexMap*, bool>
136  getDOFTableForExtrapolatorData() const override;
137 
141  bool hasMechanicalProcess(int const process_id) const
142  {
143  return _use_monolithic_scheme || process_id == 1;
144  }
145 
148 };
149 
150 extern template class HydroMechanicsProcess<2>;
151 extern template class HydroMechanicsProcess<3>;
152 
153 } // namespace HydroMechanics
154 } // namespace ProcessLib
MathLib::SparsityPattern< GlobalIndexType > GlobalSparsityPattern
Global vector based on Eigen vector.
Definition: EigenVector.h:28
void postNonLinearSolverConcreteProcess(GlobalVector const &x, GlobalVector const &xdot, const double t, double const dt, int const process_id) override
HydroMechanicsProcessData< DisplacementDim > _process_data
std::vector< std::unique_ptr< LocalAssemblerIF > > _local_assemblers
std::unique_ptr< MeshLib::MeshSubset const > _mesh_subset_base_nodes
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)
std::unique_ptr< NumLib::LocalToGlobalIndexMap > _local_to_global_index_map_single_component
void preTimestepConcreteProcess(std::vector< GlobalVector * > const &x, double const t, double const dt, const int process_id) override
NumLib::LocalToGlobalIndexMap const & getDOFTable(const int process_id) const override
void postTimestepConcreteProcess(std::vector< GlobalVector * > const &x, const double t, const double dt, int const process_id) override
void assembleWithJacobianConcreteProcess(const double t, double const, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &xdot, int const process_id, GlobalMatrix &M, GlobalMatrix &K, GlobalVector &b, GlobalMatrix &Jac) override
std::unique_ptr< NumLib::LocalToGlobalIndexMap > _local_to_global_index_map_with_base_nodes
MeshLib::PropertyVector< double > * _nodal_forces
void setInitialConditionsConcreteProcess(std::vector< GlobalVector * > &x, double const t, int const process_id) override
MeshLib::PropertyVector< double > * _hydraulic_flow
MathLib::MatrixSpecifications getMatrixSpecifications(const int process_id) const override
void initializeConcreteProcess(NumLib::LocalToGlobalIndexMap const &dof_table, MeshLib::Mesh const &mesh, unsigned const integration_order) override
Process specific initialization called by initialize().
void assembleConcreteProcess(const double t, double const, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &xdot, int const process_id, GlobalMatrix &M, GlobalMatrix &K, GlobalVector &b) override
void computeSecondaryVariableConcrete(double const t, double const dt, std::vector< GlobalVector * > const &x, GlobalVector const &x_dot, const int process_id) override
std::tuple< NumLib::LocalToGlobalIndexMap *, bool > getDOFTableForExtrapolatorData() const override
std::string const name
Definition: Process.h:327
const bool _use_monolithic_scheme
Definition: Process.h:339
Handles configuration of several secondary variables from the project file.
static const double t