OGS
BoundaryCondition.h
Go to the documentation of this file.
1 
11 #pragma once
12 
13 #include "NumLib/NumericsConfig.h"
14 
15 namespace MeshLib
16 {
17 class Mesh;
18 }
19 
20 namespace NumLib
21 {
22 class LocalToGlobalIndexMap;
23 template <typename>
24 struct IndexValueVector;
25 } // namespace NumLib
26 namespace ParameterLib
27 {
28 struct ParameterBase;
29 }
30 namespace ProcessLib
31 {
32 struct BoundaryConditionConfig;
33 class Process;
34 
36 {
37 public:
40  virtual void applyNaturalBC(const double /*t*/,
41  std::vector<GlobalVector*> const& /*x*/,
42  int const /*process_id*/, GlobalMatrix& /*K*/,
43  GlobalVector& /*b*/, GlobalMatrix* /*Jac*/)
44  {
45  // By default it is assumed that the BC is not a natural BC. Therefore
46  // there is nothing to do here.
47  }
48 
50  virtual void getEssentialBCValues(
51  const double /*t*/, GlobalVector const& /*x*/,
52  NumLib::IndexValueVector<GlobalIndexType>& /*bc_values*/) const
53  {
54  // By default it is assumed that the BC is not an essential BC.
55  // Therefore there is nothing to do here.
56  }
57 
58  virtual void preTimestep(const double /*t*/,
59  std::vector<GlobalVector*> const& /*x*/,
60  int const /*process_id*/)
61  {
62  // A hook added for solution dependent dirichlet
63  }
64 
65  virtual void postTimestep(const double /*t*/,
66  std::vector<GlobalVector*> const& /*x*/,
67  int const /*process_id*/)
68  {
69  // A hook added for solution dependent dirichlet
70  }
71 
72  virtual ~BoundaryCondition() = default;
73 };
74 
75 } // namespace ProcessLib
Global vector based on Eigen vector.
Definition: EigenVector.h:26
virtual void applyNaturalBC(const double, std::vector< GlobalVector * > const &, int const, GlobalMatrix &, GlobalVector &, GlobalMatrix *)
virtual void getEssentialBCValues(const double, GlobalVector const &, NumLib::IndexValueVector< GlobalIndexType > &) const
Writes the values of essential BCs to bc_values.
virtual void preTimestep(const double, std::vector< GlobalVector * > const &, int const)
virtual void postTimestep(const double, std::vector< GlobalVector * > const &, int const)
virtual ~BoundaryCondition()=default