OGS
TimeDecayDirichletBoundaryCondition.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
6#include <memory>
7
11
12namespace ParameterLib
13{
14template <typename T>
15struct Parameter;
16} // namespace ParameterLib
17
18namespace MeshLib
19{
20class Mesh;
21}
22
23namespace ProcessLib
24{
42{
43public:
62 int const variable_id, int const component_id,
63 MeshLib::Mesh const& boundary_mesh,
64 NumLib::LocalToGlobalIndexMap const& dof_table_bulk,
65 ParameterLib::Parameter<double> const& time_decay_parameter,
66 double const lower_limit);
67
69 const double t, GlobalVector const& x,
70 NumLib::IndexValueVector<GlobalIndexType>& bc_values) const override;
71
72private:
73 int const variable_id_;
74 int const component_id_;
75
77
78 std::unique_ptr<NumLib::LocalToGlobalIndexMap> const dof_table_boundary_;
79
91
93 double const lower_limit_;
94
97 mutable std::vector<double> initial_x_values_;
98
99 mutable bool initial_values_are_set_ = false;
100
101 void setInitialValues(GlobalVector const& x) const;
102};
103
104} // namespace ProcessLib
MathLib::EigenVector GlobalVector
void getEssentialBCValues(const double t, GlobalVector const &x, NumLib::IndexValueVector< GlobalIndexType > &bc_values) const override
Writes the values of essential BCs to bc_values.
TimeDecayDirichletBoundaryCondition(int const variable_id, int const component_id, MeshLib::Mesh const &boundary_mesh, NumLib::LocalToGlobalIndexMap const &dof_table_bulk, ParameterLib::Parameter< double > const &time_decay_parameter, double const lower_limit)
Constructs a time decay Dirichlet boundary condition.
std::unique_ptr< NumLib::LocalToGlobalIndexMap > const dof_table_boundary_
ParameterLib::Parameter< double > const & time_decay_parameter_
double const lower_limit_
The lower limit of the boundary value.