OGS
ProcessVariable.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <map>
14#include <memory>
15#include <string>
16#include <vector>
17
20
21namespace MathLib
22{
23class PiecewiseLinearInterpolation;
24} // namespace MathLib
25
26namespace MeshLib
27{
28class Mesh;
29
30template <typename PROP_VAL_TYPE>
31class PropertyVector;
32} // namespace MeshLib
33
34namespace NumLib
35{
36class LocalToGlobalIndexMap;
37} // namespace NumLib
38
39namespace ParameterLib
40{
41struct ParameterBase;
42
43template <typename T>
44struct Parameter;
45} // namespace ParameterLib
46
47namespace ProcessLib
48{
49class SourceTerm;
50class BoundaryCondition;
51class Process;
52struct DeactivatedSubdomain;
53struct BoundaryConditionConfig;
54struct SourceTermConfig;
55} // namespace ProcessLib
56
57namespace ProcessLib
58{
62{
63public:
65 BaseLib::ConfigTree const& config, MeshLib::Mesh& mesh,
66 std::vector<std::unique_ptr<MeshLib::Mesh>> const& meshes,
67 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const&
68 parameters,
69 std::map<std::string,
70 std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const&
71 curves);
72
74
75 std::string const& getName() const;
76
78 MeshLib::Mesh const& getMesh() const;
79
80 std::vector<DeactivatedSubdomain> const& getDeactivatedSubdomains() const
81 {
83 }
84
85 void updateDeactivatedSubdomains(double const time);
86
87 std::vector<std::size_t> const& getActiveElementIDs() const
88 {
90 }
91
94
95 std::vector<std::unique_ptr<BoundaryCondition>> createBoundaryConditions(
96 const NumLib::LocalToGlobalIndexMap& dof_table, const int variable_id,
97 unsigned const integration_order,
98 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const&
99 parameters,
100 Process const& process,
101 std::vector<std::reference_wrapper<ProcessVariable>> const&
102 all_process_variables_for_this_process,
103 std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const&
104 media);
105
106 std::vector<std::unique_ptr<SourceTerm>> createSourceTerms(
107 const NumLib::LocalToGlobalIndexMap& dof_table, const int variable_id,
108 unsigned const integration_order,
109 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const&
110 parameters,
111 std::vector<std::reference_wrapper<ProcessVariable>> const&
112 all_process_variables_for_this_process);
113
118
119 unsigned getShapeFunctionOrder() const { return _shapefunction_order; }
120
125
127
128private:
129 std::string const _name;
131 const int _n_components;
146
147 std::vector<DeactivatedSubdomain> _deactivated_subdomains;
148
151 mutable std::vector<std::size_t> _ids_of_active_elements;
153
155 const NumLib::LocalToGlobalIndexMap& dof_table, const int variable_id,
156 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const&
157 parameters,
158 std::vector<std::unique_ptr<BoundaryCondition>>& bcs);
159
161
162 std::vector<BoundaryConditionConfig> _bc_configs;
163 std::vector<SourceTermConfig> _source_term_configs;
164
166};
167
168} // namespace ProcessLib
void updateDeactivatedSubdomains(double const time)
ParameterLib::Parameter< double > const & _initial_condition
std::vector< BoundaryConditionConfig > _bc_configs
ProcessVariable(BaseLib::ConfigTree const &config, MeshLib::Mesh &mesh, std::vector< std::unique_ptr< MeshLib::Mesh > > const &meshes, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > const &curves)
MeshLib::Mesh const & getMesh() const
Returns a mesh on which the process variable is defined.
std::vector< std::size_t > const & getActiveElementIDs() const
ProcessVariable(ProcessVariable &&)
ParameterLib::Parameter< double > const & getInitialCondition() const
std::vector< std::unique_ptr< SourceTerm > > createSourceTerms(const NumLib::LocalToGlobalIndexMap &dof_table, const int variable_id, unsigned const integration_order, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::vector< std::reference_wrapper< ProcessVariable > > const &all_process_variables_for_this_process)
std::vector< DeactivatedSubdomain > _deactivated_subdomains
const bool _compensate_non_equilibrium_initial_residuum
unsigned getShapeFunctionOrder() const
std::string const & getName() const
MeshLib::PropertyVector< unsigned char > * _is_active
std::vector< std::size_t > _ids_of_active_elements
std::vector< SourceTermConfig > _source_term_configs
bool compensateNonEquilibriumInitialResiduum() const
int getNumberOfGlobalComponents() const
Returns the number of components of the process variable.
std::vector< std::unique_ptr< BoundaryCondition > > createBoundaryConditions(const NumLib::LocalToGlobalIndexMap &dof_table, const int variable_id, unsigned const integration_order, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, Process const &process, std::vector< std::reference_wrapper< ProcessVariable > > const &all_process_variables_for_this_process, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
void createBoundaryConditionsForDeactivatedSubDomains(const NumLib::LocalToGlobalIndexMap &dof_table, const int variable_id, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::vector< std::unique_ptr< BoundaryCondition > > &bcs)
std::vector< DeactivatedSubdomain > const & getDeactivatedSubdomains() const