OGS
PythonBoundaryConditionPythonSideInterface.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
6namespace ProcessLib
7{
12{
13public:
22 virtual std::pair<bool, double> getDirichletBCValue(
23 double /*t*/, std::array<double, 3> /*x*/, std::size_t /*node_id*/,
24 std::vector<double> const& /*primary_variables*/) const
25 {
27 return {false, std::numeric_limits<double>::quiet_NaN()};
28 }
29
38 virtual std::tuple<bool, double, std::vector<double>> getFlux(
39 double /*t*/,
40 std::array<double, 3> /*x*/,
41 std::vector<double> const& /*primary_variables*/) const
42 {
43 _overridden_natural = false;
44 return std::tuple<bool, double, std::vector<double>>{
45 false, std::numeric_limits<double>::quiet_NaN(), {}};
46 }
47
54
59
61
62private:
65 mutable bool _overridden_essential = true;
67 mutable bool _overridden_natural = true;
68};
69} // namespace ProcessLib
virtual std::pair< bool, double > getDirichletBCValue(double, std::array< double, 3 >, std::size_t, std::vector< double > const &) const
virtual std::tuple< bool, double, std::vector< double > > getFlux(double, std::array< double, 3 >, std::vector< double > const &) const
bool _overridden_natural
Tells if getFlux() has been overridden in the derived class in Python.