OGS
ProcessLib::PythonBoundaryConditionPythonSideInterfaceTrampoline Class Reference

Detailed Description

Trampoline class allowing methods of class PythonBoundaryConditionPythonSideInterface to be overridden on the Python side. Cf. https://pybind11.readthedocs.io/en/stable/advanced/classes.html

Definition at line 15 of file PythonBoundaryConditionModule.cpp.

Inheritance diagram for ProcessLib::PythonBoundaryConditionPythonSideInterfaceTrampoline:
[legend]
Collaboration diagram for ProcessLib::PythonBoundaryConditionPythonSideInterfaceTrampoline:
[legend]

Public Member Functions

std::pair< bool, double > getDirichletBCValue (double t, std::array< double, 3 > x, std::size_t node_id, std::vector< double > const &primary_variables) const override
std::tuple< bool, double, std::vector< double > > getFlux (double t, std::array< double, 3 > x, std::vector< double > const &primary_variables) const override
Public Member Functions inherited from ProcessLib::PythonBoundaryConditionPythonSideInterface
bool isOverriddenEssential () const
bool isOverriddenNatural () const
virtual ~PythonBoundaryConditionPythonSideInterface ()=default

Member Function Documentation

◆ getDirichletBCValue()

std::pair< bool, double > ProcessLib::PythonBoundaryConditionPythonSideInterfaceTrampoline::getDirichletBCValue ( double ,
std::array< double, 3 > ,
std::size_t ,
std::vector< double > const &  ) const
inlineoverridevirtual

Computes Dirichlet boundary condition values for the provided arguments (time, position of the node, node id, primary variables at the node).

Returns
a pair (is_dirichlet, value) indicating if a Dirichlet BC shall be set at that node and (if so) the value of the Dirichlet BC at that node.

Reimplemented from ProcessLib::PythonBoundaryConditionPythonSideInterface.

Definition at line 22 of file PythonBoundaryConditionModule.cpp.

25 {
26 using Ret = std::pair<bool, double>;
27 PYBIND11_OVERLOAD(Ret, PythonBoundaryConditionPythonSideInterface,
28 getDirichletBCValue, t, x, node_id,
29 primary_variables);
30 }
std::pair< bool, double > getDirichletBCValue(double t, std::array< double, 3 > x, std::size_t node_id, std::vector< double > const &primary_variables) const override

References getDirichletBCValue().

Referenced by getDirichletBCValue().

◆ getFlux()

std::tuple< bool, double, std::vector< double > > ProcessLib::PythonBoundaryConditionPythonSideInterfaceTrampoline::getFlux ( double ,
std::array< double, 3 > ,
std::vector< double > const &  ) const
inlineoverridevirtual

Computes the flux for the provided arguments (time, position, primary variables at that position).

Returns
a pair (is_natural, flux, flux_jacobian) indicating if a natural BC shall be set at that position and (if so) the flux at that node and the derivative of the flux w.r.t. all primary variables.

Reimplemented from ProcessLib::PythonBoundaryConditionPythonSideInterface.

Definition at line 32 of file PythonBoundaryConditionModule.cpp.

35 {
36 using Ret = std::tuple<bool, double, std::vector<double>>;
37 PYBIND11_OVERLOAD(Ret, PythonBoundaryConditionPythonSideInterface,
38 getFlux, t, x, primary_variables);
39 }
std::tuple< bool, double, std::vector< double > > getFlux(double t, std::array< double, 3 > x, std::vector< double > const &primary_variables) const override

References getFlux().

Referenced by getFlux().


The documentation for this class was generated from the following file: