OGS
ProcessVariable.h
Go to the documentation of this file.
1 
11 #pragma once
12 
14 #include "ParameterLib/Parameter.h"
17 
18 // DeactivatedSubdomain cannot be forwardly declared because that
19 // std::unique_ptr<DeactivatedSubdomain> type member requires its full
20 // definition (see https://stackoverflow.com/a/6089065).
22 
23 namespace MeshLib
24 {
25 class Mesh;
26 template <typename T>
27 class PropertyVector;
28 } // namespace MeshLib
29 namespace NumLib
30 {
31 class LocalToGlobalIndexMap;
32 }
33 
34 namespace ProcessLib
35 {
36 class SourceTerm;
37 class BoundaryCondition;
38 class Process;
39 } // namespace ProcessLib
40 
41 namespace ProcessLib
42 {
46 {
47 public:
49  BaseLib::ConfigTree const& config, MeshLib::Mesh& mesh,
50  std::vector<std::unique_ptr<MeshLib::Mesh>> const& meshes,
51  std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const&
52  parameters,
53  std::map<std::string,
54  std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const&
55  curves);
56 
57  ProcessVariable(ProcessVariable&& other) = default;
58 
59  std::string const& getName() const;
60 
62  MeshLib::Mesh const& getMesh() const;
63 
64  std::vector<DeactivatedSubdomain> const& getDeactivatedSubdomains() const
65  {
67  }
68 
69  void updateDeactivatedSubdomains(double const time);
70 
71  std::vector<std::size_t> const& getActiveElementIDs() const
72  {
74  }
75 
78 
79  std::vector<std::unique_ptr<BoundaryCondition>> createBoundaryConditions(
80  const NumLib::LocalToGlobalIndexMap& dof_table, const int variable_id,
81  unsigned const integration_order,
82  std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const&
83  parameters,
84  Process const& process,
85  std::vector<std::reference_wrapper<ProcessVariable>> const&
86  all_process_variables_for_this_process);
87 
88  std::vector<std::unique_ptr<SourceTerm>> createSourceTerms(
89  const NumLib::LocalToGlobalIndexMap& dof_table, const int variable_id,
90  unsigned const integration_order,
91  std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const&
92  parameters,
93  std::vector<std::reference_wrapper<ProcessVariable>> const&
94  all_process_variables_for_this_process);
95 
97  {
98  return _initial_condition;
99  }
100 
101  unsigned getShapeFunctionOrder() const { return _shapefunction_order; }
102 
104  {
106  }
107 
108 private:
109  std::string const _name;
111  const int _n_components;
126 
127  std::vector<DeactivatedSubdomain> _deactivated_subdomains;
128 
131  mutable std::vector<std::size_t> _ids_of_active_elements;
133 
135  const NumLib::LocalToGlobalIndexMap& dof_table, const int variable_id,
136  std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const&
137  parameters,
138  std::vector<std::unique_ptr<BoundaryCondition>>& bcs);
139 
141 
142  std::vector<BoundaryConditionConfig> _bc_configs;
143  std::vector<SourceTermConfig> _source_term_configs;
144 
146 };
147 
148 } // namespace ProcessLib
void updateDeactivatedSubdomains(double const time)
ParameterLib::Parameter< double > const & _initial_condition
std::vector< BoundaryConditionConfig > _bc_configs
MeshLib::Mesh const & getMesh() const
Returns a mesh on which the process variable is defined.
ProcessVariable(ProcessVariable &&other)=default
std::vector< DeactivatedSubdomain > _deactivated_subdomains
const bool _compensate_non_equilibrium_initial_residuum
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)
unsigned getShapeFunctionOrder() const
std::string const & getName() const
MeshLib::PropertyVector< unsigned char > * _is_active
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)
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< std::size_t > _ids_of_active_elements
std::vector< SourceTermConfig > _source_term_configs
bool compensateNonEquilibriumInitialResiduum() const
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)
int getNumberOfGlobalComponents() const
Returns the number of components of the process variable.
std::vector< std::size_t > const & getActiveElementIDs() const
std::vector< DeactivatedSubdomain > const & getDeactivatedSubdomains() const