OGS
ProcessLib/BoundaryConditionAndSourceTerm/BoundaryCondition.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
7
8namespace MeshLib
9{
10class Mesh;
11}
12
13namespace NumLib
14{
16template <typename>
17struct IndexValueVector;
18} // namespace NumLib
19namespace ParameterLib
20{
21struct ParameterBase;
22}
23namespace ProcessLib
24{
26class Process;
27
29{
30public:
33 virtual void applyNaturalBC(const double /*t*/,
34 std::vector<GlobalVector*> const& /*x*/,
35 int const /*process_id*/, GlobalMatrix* /*K*/,
36 GlobalVector& /*b*/, GlobalMatrix* /*Jac*/)
37 {
38 // By default it is assumed that the BC is not a natural BC. Therefore
39 // there is nothing to do here.
40 }
41
44 const double /*t*/, GlobalVector const& /*x*/,
46 {
47 // By default it is assumed that the BC is not an essential BC.
48 // Therefore there is nothing to do here.
49 }
50
51 virtual void preTimestep(const double /*t*/,
52 std::vector<GlobalVector*> const& /*x*/,
53 int const /*process_id*/)
54 {
55 // A hook added for solution dependent dirichlet
56 }
57
58 virtual void postTimestep(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 ~BoundaryCondition() = default;
66};
67
68} // namespace ProcessLib
MathLib::EigenMatrix GlobalMatrix
MathLib::EigenVector GlobalVector
virtual void getEssentialBCValues(const double, GlobalVector const &, NumLib::IndexValueVector< GlobalIndexType > &) const
Writes the values of essential BCs to bc_values.
virtual void applyNaturalBC(const double, std::vector< GlobalVector * > const &, int const, GlobalMatrix *, GlobalVector &, GlobalMatrix *)
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