OGS
DirichletBoundaryCondition.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
8#include "BoundaryCondition.h"
10
11namespace BaseLib
12{
13class ConfigTree;
14}
15namespace ParameterLib
16{
17template <typename T>
18struct Parameter;
19}
20
21namespace ProcessLib
22{
23// TODO docu
29{
30public:
32 ParameterLib::Parameter<double> const& parameter,
33 MeshLib::Mesh const& bc_mesh,
34 NumLib::LocalToGlobalIndexMap const& dof_table_bulk,
35 int const variable_id, int const component_id);
36
38 const double t, GlobalVector const& x,
39 NumLib::IndexValueVector<GlobalIndexType>& bc_values) const override;
40
41private:
43
45 std::unique_ptr<NumLib::LocalToGlobalIndexMap const> _dof_table_boundary;
46 int const _variable_id;
47 int const _component_id;
48};
49
50std::string parseDirichletBCConfig(BaseLib::ConfigTree const& config);
51
52std::unique_ptr<DirichletBoundaryCondition> createDirichletBoundaryCondition(
53 std::string const& parameter_name, MeshLib::Mesh const& bc_mesh,
54 NumLib::LocalToGlobalIndexMap const& dof_table_bulk, int const variable_id,
55 int const component_id,
56 const std::vector<std::unique_ptr<ParameterLib::ParameterBase>>&
57 parameters);
58
59} // 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.
DirichletBoundaryCondition(ParameterLib::Parameter< double > const &parameter, MeshLib::Mesh const &bc_mesh, NumLib::LocalToGlobalIndexMap const &dof_table_bulk, int const variable_id, int const component_id)
ParameterLib::Parameter< double > const & _parameter
std::unique_ptr< NumLib::LocalToGlobalIndexMap const > _dof_table_boundary
std::string parseDirichletBCConfig(BaseLib::ConfigTree const &config)
std::unique_ptr< DirichletBoundaryCondition > createDirichletBoundaryCondition(std::string const &parameter_name, MeshLib::Mesh const &bc_mesh, NumLib::LocalToGlobalIndexMap const &dof_table_bulk, int const variable_id, int const component_id, const std::vector< std::unique_ptr< ParameterLib::ParameterBase > > &parameters)