OGS 6.2.0-244-g47b8a9a9d
ProcessVariable.h
Go to the documentation of this file.
1 
10 #pragma once
11 
13 
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 }
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 
55 
56  std::string const& getName() const;
57 
59  MeshLib::Mesh const& getMesh() const;
60 
61  std::vector<std::unique_ptr<DeactivatedSubdomain const>> const&
63  {
64  return _deactivated_subdomains;
65  }
66 
67  void updateDeactivatedSubdomains(double const time);
68 
69  std::vector<std::size_t>& getActiveElementIDs() const
70  {
71  return _ids_of_active_elements;
72  }
73 
75  int getNumberOfComponents() const { return _n_components; }
76  std::vector<std::unique_ptr<BoundaryCondition>> createBoundaryConditions(
77  const NumLib::LocalToGlobalIndexMap& dof_table, const int variable_id,
78  unsigned const integration_order,
79  std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const&
80  parameters,
81  Process const& process);
82 
83  std::vector<std::unique_ptr<SourceTerm>> createSourceTerms(
84  const NumLib::LocalToGlobalIndexMap& dof_table, const int variable_id,
85  unsigned const integration_order,
86  std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const&
87  parameters);
88 
90  {
91  return _initial_condition;
92  }
93 
94  unsigned getShapeFunctionOrder() const { return _shapefunction_order; }
95 private:
96  std::string const _name;
98  const int _n_components;
113 
114  std::vector<std::unique_ptr<DeactivatedSubdomain const>>
116 
119  mutable std::vector<std::size_t> _ids_of_active_elements;
120 
121  void createBoundaryConditionsForDeactivatedSubDomains(
122  const NumLib::LocalToGlobalIndexMap& dof_table, const int variable_id,
123  std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const&
124  parameters,
125  std::vector<std::unique_ptr<BoundaryCondition>>& bcs);
126 
128 
129  std::vector<BoundaryConditionConfig> _bc_configs;
130  std::vector<SourceTermConfig> _source_term_configs;
131 };
132 
133 } // namespace ProcessLib
ParameterLib::Parameter< double > const & getInitialCondition() const
std::vector< std::unique_ptr< DeactivatedSubdomain const > > _deactivated_subdomains
std::vector< SourceTermConfig > _source_term_configs
std::vector< std::size_t > _ids_of_active_elements
std::string getName(std::string const &line)
Returns the name/title from the "Zone"-description.
ParameterLib::Parameter< double > const & _initial_condition
Interface for heuristic search length strategy.
Definition: ProjectData.h:29
int getNumberOfComponents() const
Returns the number of components of the process variable.
std::vector< std::unique_ptr< DeactivatedSubdomain const > > const & getDeactivatedSubdomains() const
std::vector< BoundaryConditionConfig > _bc_configs
unsigned getShapeFunctionOrder() const
std::vector< std::size_t > & getActiveElementIDs() const