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
6
namespace
ProcessLib
7
{
11
class
PythonBoundaryConditionPythonSideInterface
12
{
13
public
:
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
{
26
_overridden_essential
=
false
;
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
53
bool
isOverriddenEssential
()
const
{
return
_overridden_essential
; }
54
58
bool
isOverriddenNatural
()
const
{
return
_overridden_natural
; }
59
60
virtual
~PythonBoundaryConditionPythonSideInterface
() =
default
;
61
62
private
:
65
mutable
bool
_overridden_essential
=
true
;
67
mutable
bool
_overridden_natural
=
true
;
68
};
69
}
// namespace ProcessLib
ProcessLib::PythonBoundaryConditionPythonSideInterface
Definition
PythonBoundaryConditionPythonSideInterface.h:12
ProcessLib::PythonBoundaryConditionPythonSideInterface::~PythonBoundaryConditionPythonSideInterface
virtual ~PythonBoundaryConditionPythonSideInterface()=default
ProcessLib::PythonBoundaryConditionPythonSideInterface::isOverriddenNatural
bool isOverriddenNatural() const
Definition
PythonBoundaryConditionPythonSideInterface.h:58
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:22
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:38
ProcessLib::PythonBoundaryConditionPythonSideInterface::isOverriddenEssential
bool isOverriddenEssential() const
Definition
PythonBoundaryConditionPythonSideInterface.h:53
ProcessLib::PythonBoundaryConditionPythonSideInterface::_overridden_essential
bool _overridden_essential
Definition
PythonBoundaryConditionPythonSideInterface.h:65
ProcessLib::PythonBoundaryConditionPythonSideInterface::_overridden_natural
bool _overridden_natural
Tells if getFlux() has been overridden in the derived class in Python.
Definition
PythonBoundaryConditionPythonSideInterface.h:67
ProcessLib
Definition
ProjectData.h:40
ProcessLib
BoundaryConditionAndSourceTerm
Python
PythonBoundaryConditionPythonSideInterface.h
Generated by
1.14.0