OGS
LIE/HydroMechanics/HydroMechanicsProcess.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
9
10namespace ProcessLib
11{
12namespace LIE
13{
14namespace HydroMechanics
15{
17
18template <int DisplacementDim>
19class HydroMechanicsProcess final : public Process
20{
21 static_assert(DisplacementDim == 2 || DisplacementDim == 3,
22 "Currently LIE::HydroMechanicsProcess "
23 "supports only 2D or 3D.");
24
25public:
27 std::string name,
28 MeshLib::Mesh& mesh,
29 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&&
30 jacobian_assembler,
31 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const&
32 parameters,
33 unsigned const integration_order,
34 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>&&
35 process_variables,
37 SecondaryVariableCollection&& secondary_variables,
38 bool const use_monolithic_scheme);
39
42 bool isLinear() const override;
44
45 void postTimestepConcreteProcess(std::vector<GlobalVector*> const& x,
46 std::vector<GlobalVector*> const& x_prev,
47 double const t, double const dt,
48 int const process_id) override;
49
50private:
52
53 void constructDofTable() override;
54
56 NumLib::LocalToGlobalIndexMap const& dof_table,
57 MeshLib::Mesh const& mesh,
58 unsigned const integration_order) override;
59
60 void assembleConcreteProcess(const double t, double const dt,
61 std::vector<GlobalVector*> const& x,
62 std::vector<GlobalVector*> const& x_prev,
63 int const process_id, GlobalMatrix& M,
64 GlobalMatrix& K, GlobalVector& b) override;
65
67 const double t, double const dt, std::vector<GlobalVector*> const& x,
68 std::vector<GlobalVector*> const& x_prev, int const process_id,
69 GlobalVector& b, GlobalMatrix& Jac) override;
70 void preTimestepConcreteProcess(std::vector<GlobalVector*> const& x,
71 double const t, double const dt,
72 int const process_id) override;
74
75private:
77
78 std::vector<std::unique_ptr<LocalAssemblerInterface>> _local_assemblers;
79
80 std::vector<MeshLib::Element*> _vec_matrix_elements;
81 std::vector<int> _vec_fracture_mat_IDs;
82 std::vector<std::vector<MeshLib::Element*>> _vec_fracture_elements;
83 std::vector<std::vector<MeshLib::Element*>> _vec_fracture_matrix_elements;
84 std::vector<std::vector<MeshLib::Node*>> _vec_fracture_nodes;
85 std::vector<MeshLib::Node*> _vec_junction_nodes;
86 std::vector<std::vector<MeshLib::Element*>>
88
89 std::vector<std::unique_ptr<MeshLib::MeshSubset const>>
91 std::unique_ptr<MeshLib::MeshSubset const> _mesh_subset_junction_nodes;
92 std::unique_ptr<MeshLib::MeshSubset const> _mesh_subset_matrix_nodes;
93
94 std::vector<MeshLib::Node*> _mesh_nodes_p;
95 std::unique_ptr<MeshLib::MeshSubset const> _mesh_subset_nodes_p;
96};
97
98} // namespace HydroMechanics
99} // namespace LIE
100} // namespace ProcessLib
MathLib::EigenMatrix GlobalMatrix
MathLib::EigenVector GlobalVector
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 postTimestepConcreteProcess(std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, double const t, double const dt, int const process_id) override
void initializeConcreteProcess(NumLib::LocalToGlobalIndexMap const &dof_table, MeshLib::Mesh const &mesh, unsigned const integration_order) override
Process specific initialization called by initialize().
std::vector< std::unique_ptr< MeshLib::MeshSubset const > > _mesh_subset_fracture_nodes
std::vector< std::vector< MeshLib::Element * > > _vec_junction_fracture_matrix_elements
void preTimestepConcreteProcess(std::vector< GlobalVector * > const &x, double const t, double const dt, int const 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
void updateElementLevelSets(MeshLib::Element const &e, MeshLib::Mesh &mesh)
std::vector< std::vector< MeshLib::Element * > > _vec_fracture_elements
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
std::vector< std::unique_ptr< LocalAssemblerInterface > > _local_assemblers
std::vector< std::vector< MeshLib::Element * > > _vec_fracture_matrix_elements
std::string const name
Definition Process.h:361
Process(std::string name_, MeshLib::Mesh &mesh, std::unique_ptr< 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, SecondaryVariableCollection &&secondary_variables, const bool use_monolithic_scheme=true)
Definition Process.cpp:37
Handles configuration of several secondary variables from the project file.