OGS
SolutionDependentDirichletBoundaryCondition.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 <string>
7
8#include "BoundaryCondition.h"
11
12namespace ProcessLib
13{
19
29 : public BoundaryCondition
30{
31public:
33 std::string property_name,
34 ParameterLib::Parameter<double> const& parameter,
35 MeshLib::Mesh const& bc_mesh,
36 NumLib::LocalToGlobalIndexMap const& dof_table_bulk,
37 int const variable_id, int const component_id);
38
40 double const t, GlobalVector const& x,
41 NumLib::IndexValueVector<GlobalIndexType>& bc_values) const override;
42
54 void postTimestep(double const /*t*/,
55 std::vector<GlobalVector*> const& x,
56 int const process_id) override;
57
58private:
60 int const _variable_id;
61 int const _component_id;
62 std::unique_ptr<NumLib::LocalToGlobalIndexMap const> _dof_table_boundary;
63 std::unique_ptr<ParameterLib::MeshNodeParameter<double>> _parameter;
64 // avoid repetitively retrieving the desired property from the boundary mesh
65 // over time steps
67};
68
71 BaseLib::ConfigTree const& config);
72
73std::unique_ptr<SolutionDependentDirichletBoundaryCondition>
76 MeshLib::Mesh const& bc_mesh,
77 NumLib::LocalToGlobalIndexMap const& dof_table_bulk, int const variable_id,
78 int const component_id,
79 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const&
80 parameters);
81
82} // namespace ProcessLib
MathLib::EigenVector GlobalVector
void getEssentialBCValues(double const t, GlobalVector const &x, NumLib::IndexValueVector< GlobalIndexType > &bc_values) const override
Writes the values of essential BCs to bc_values.
std::unique_ptr< NumLib::LocalToGlobalIndexMap const > _dof_table_boundary
std::unique_ptr< ParameterLib::MeshNodeParameter< double > > _parameter
SolutionDependentDirichletBoundaryCondition(std::string property_name, ParameterLib::Parameter< double > const &parameter, MeshLib::Mesh const &bc_mesh, NumLib::LocalToGlobalIndexMap const &dof_table_bulk, int const variable_id, int const component_id)
void postTimestep(double const, std::vector< GlobalVector * > const &x, int const process_id) override
std::unique_ptr< SolutionDependentDirichletBoundaryCondition > createSolutionDependentDirichletBoundaryCondition(SolutionDependentDirichletBoundaryConditionConfig const &config, MeshLib::Mesh const &bc_mesh, NumLib::LocalToGlobalIndexMap const &dof_table_bulk, int const variable_id, int const component_id, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters)
SolutionDependentDirichletBoundaryConditionConfig parseSolutionDependentDirichletBoundaryCondition(BaseLib::ConfigTree const &config)