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 22 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 29 of file PythonBoundaryConditionModule.cpp.

32  {
33  using Ret = std::pair<bool, double>;
34  PYBIND11_OVERLOAD(Ret, PythonBoundaryConditionPythonSideInterface,
35  getDirichletBCValue, t, x, node_id,
36  primary_variables);
37  }
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

◆ 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 39 of file PythonBoundaryConditionModule.cpp.

42  {
43  using Ret = std::tuple<bool, double, std::vector<double>>;
44  PYBIND11_OVERLOAD(Ret, PythonBoundaryConditionPythonSideInterface,
45  getFlux, t, x, primary_variables);
46  }
std::tuple< bool, double, std::vector< double > > getFlux(double t, std::array< double, 3 > x, std::vector< double > const &primary_variables) const override

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