OGS
PythonBoundaryConditionPythonSideInterface.h
Go to the documentation of this file.
1
11
#pragma once
12
13
namespace
ProcessLib
14
{
18
class
PythonBoundaryConditionPythonSideInterface
19
{
20
public
:
29
virtual
std::pair<bool, double>
getDirichletBCValue
(
30
double
/*t*/
, std::array<double, 3>
/*x*/
, std::size_t
/*node_id*/
,
31
std::vector<double>
const
&
/*primary_variables*/
)
const
32
{
33
_overridden_essential
=
false
;
34
return
{
false
, std::numeric_limits<double>::quiet_NaN()};
35
}
36
45
virtual
std::tuple<bool, double, std::vector<double>>
getFlux
(
46
double
/*t*/
,
47
std::array<double, 3>
/*x*/
,
48
std::vector<double>
const
&
/*primary_variables*/
)
const
49
{
50
_overridden_natural
=
false
;
51
return
std::tuple<bool, double, std::vector<double>>{
52
false
, std::numeric_limits<double>::quiet_NaN(), {}};
53
}
54
60
bool
isOverriddenEssential
()
const
{
return
_overridden_essential
; }
61
65
bool
isOverriddenNatural
()
const
{
return
_overridden_natural
; }
66
67
virtual
~PythonBoundaryConditionPythonSideInterface
() =
default
;
68
69
private
:
72
mutable
bool
_overridden_essential
=
true
;
74
mutable
bool
_overridden_natural
=
true
;
75
};
76
}
// namespace ProcessLib
ProcessLib::PythonBoundaryConditionPythonSideInterface
Definition
PythonBoundaryConditionPythonSideInterface.h:19
ProcessLib::PythonBoundaryConditionPythonSideInterface::~PythonBoundaryConditionPythonSideInterface
virtual ~PythonBoundaryConditionPythonSideInterface()=default
ProcessLib::PythonBoundaryConditionPythonSideInterface::isOverriddenNatural
bool isOverriddenNatural() const
Definition
PythonBoundaryConditionPythonSideInterface.h:65
ProcessLib::PythonBoundaryConditionPythonSideInterface::getDirichletBCValue
virtual std::pair< bool, double > getDirichletBCValue(double, std::array< double, 3 >, std::size_t, std::vector< double > const &) const
Definition
PythonBoundaryConditionPythonSideInterface.h:29
ProcessLib::PythonBoundaryConditionPythonSideInterface::getFlux
virtual std::tuple< bool, double, std::vector< double > > getFlux(double, std::array< double, 3 >, std::vector< double > const &) const
Definition
PythonBoundaryConditionPythonSideInterface.h:45
ProcessLib::PythonBoundaryConditionPythonSideInterface::isOverriddenEssential
bool isOverriddenEssential() const
Definition
PythonBoundaryConditionPythonSideInterface.h:60
ProcessLib::PythonBoundaryConditionPythonSideInterface::_overridden_essential
bool _overridden_essential
Definition
PythonBoundaryConditionPythonSideInterface.h:72
ProcessLib::PythonBoundaryConditionPythonSideInterface::_overridden_natural
bool _overridden_natural
Tells if getFlux() has been overridden in the derived class in Python.
Definition
PythonBoundaryConditionPythonSideInterface.h:74
ProcessLib
Definition
ProjectData.h:51
ProcessLib
BoundaryConditionAndSourceTerm
Python
PythonBoundaryConditionPythonSideInterface.h
Generated by
1.11.0