OGS 6.2.1-76-gbb689931b
HTProcess.h
Go to the documentation of this file.
1 
10 #pragma once
11 
12 #include <array>
13 
14 #include "HTProcessData.h"
15 #include "ProcessLib/Process.h"
16 
17 namespace NumLib
18 {
19 class LocalToGlobalIndexMap;
20 }
21 
22 namespace ProcessLib
23 {
24 struct SurfaceFluxData;
25 
26 namespace HT
27 {
28 class HTLocalAssemblerInterface;
29 
49 class HTProcess final : public Process
50 {
51 public:
52  HTProcess(
53  std::string name,
54  MeshLib::Mesh& mesh,
55  std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&&
56  jacobian_assembler,
57  std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const&
58  parameters,
59  unsigned const integration_order,
60  std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>&&
61  process_variables,
62  HTProcessData&& process_data,
63  SecondaryVariableCollection&& secondary_variables,
64  NumLib::NamedFunctionCaller&& named_function_caller,
65  bool const use_monolithic_scheme,
66  std::unique_ptr<ProcessLib::SurfaceFluxData>&& surfaceflux,
67  const int heat_transport_process_id,
68  const int hydraulic_process_id);
71 
72  bool isLinear() const override { return false; }
74 
75  Eigen::Vector3d getFlux(std::size_t element_id,
76  MathLib::Point3d const& p,
77  double const t,
78  GlobalVector const& x) const override;
79 
80  void setCoupledTermForTheStaggeredSchemeToLocalAssemblers() override;
81 
82  void postTimestepConcreteProcess(GlobalVector const& x,
83  const double t,
84  const double delta_t,
85  int const process_id) override;
86 
87 private:
88  void initializeConcreteProcess(
89  NumLib::LocalToGlobalIndexMap const& dof_table,
90  MeshLib::Mesh const& mesh,
91  unsigned const integration_order) override;
92 
93  void assembleConcreteProcess(const double t, GlobalVector const& x,
94  GlobalMatrix& M, GlobalMatrix& K,
95  GlobalVector& b) override;
96 
97  void assembleWithJacobianConcreteProcess(
98  const double t, GlobalVector const& x, GlobalVector const& xdot,
99  const double dxdot_dx, const double dx_dx, GlobalMatrix& M,
100  GlobalMatrix& K, GlobalVector& b, GlobalMatrix& Jac) override;
101 
102  void preTimestepConcreteProcess(GlobalVector const& x, double const t,
103  double const dt,
104  const int process_id) override;
105 
106  void setCoupledSolutionsOfPreviousTimeStepPerProcess(const int process_id);
107 
111  void setCoupledSolutionsOfPreviousTimeStep();
112 
116  std::tuple<NumLib::LocalToGlobalIndexMap*, bool>
117  getDOFTableForExtrapolatorData() const override;
118 
120 
121  std::vector<std::unique_ptr<HTLocalAssemblerInterface>> _local_assemblers;
122 
124  std::array<std::unique_ptr<GlobalVector>, 2> _xs_previous_timestep;
125 
126  std::unique_ptr<ProcessLib::SurfaceFluxData> _surfaceflux;
127 
130 };
131 
132 } // namespace HT
133 } // namespace ProcessLib
std::unique_ptr< ProcessLib::SurfaceFluxData > _surfaceflux
Definition: HTProcess.h:126
const int _hydraulic_process_id
Definition: HTProcess.h:129
HTProcessData _process_data
Definition: HTProcess.h:119
bool isLinear() const override
Definition: HTProcess.h:72
Builds expression trees of named functions dynamically at runtime.
Handles configuration of several secondary variables from the project file.
const int _heat_transport_process_id
Definition: HTProcess.h:128
std::array< std::unique_ptr< GlobalVector >, 2 > _xs_previous_timestep
Solutions of the previous time step.
Definition: HTProcess.h:124
std::vector< std::unique_ptr< HTLocalAssemblerInterface > > _local_assemblers
Definition: HTProcess.h:121