OGS
BHEInflowPythonBoundaryConditionModule.cpp
Go to the documentation of this file.
1
12
13#include <pybind11/stl.h>
14
16
17namespace ProcessLib
18{
24{
25public:
27 BHEInflowPythonBoundaryConditionPythonSideInterface;
28
29 std::tuple<double, std::vector<double>, std::vector<double>,
30 std::vector<int>, std::vector<double>>
31 initializeDataContainer() const override
32 {
33 using Ret = std::tuple<double, std::vector<double>, std::vector<double>,
34 std::vector<int>, std::vector<double>>;
35 PYBIND11_OVERLOAD(Ret,
38 }
39
40 std::tuple<bool, bool, std::vector<double>, std::vector<double>>
41 tespySolver(double t,
42 std::vector<double> const& Tin_val,
43 std::vector<double> const& Tout_val) const override
44 {
45 using Ret =
46 std::tuple<bool, bool, std::vector<double>, std::vector<double>>;
47 PYBIND11_OVERLOAD(Ret,
49 tespySolver, t, Tin_val, Tout_val);
50 }
51
52 std::tuple<std::vector<double>, std::vector<double>>
54 double const t, double const dt, std::vector<double> const& Tin_val,
55 std::vector<double> const& Tout_val,
56 std::vector<double> const& flowrate) const override
57 {
58 using Ret = std::tuple<std::vector<double>, std::vector<double>>;
59 PYBIND11_OVERLOAD(
61 serverCommunicationPreTimestep, t, dt, Tin_val, Tout_val, flowrate);
62 }
63
65 double const t, double const dt, std::vector<double> const& Tin_val,
66 std::vector<double> const& Tout_val,
67 std::vector<double> const& flowrate) const override
68 {
69 PYBIND11_OVERLOAD(void,
71 serverCommunicationPostTimestep, t, dt, Tin_val,
72 Tout_val, flowrate);
73 }
74};
75
76void bheInflowpythonBindBoundaryCondition(pybind11::module& m)
77{
78 namespace py = pybind11;
79
82 pybc(m, "BHENetwork");
83
84 pybc.def(py::init());
85
86 pybc.def("initializeDataContainer",
88 initializeDataContainer);
89 pybc.def("tespySolver",
91
92 pybc.def("serverCommunicationPreTimestep",
94 serverCommunicationPreTimestep);
95
96 pybc.def("serverCommunicationPostTimestep",
98 serverCommunicationPostTimestep);
99}
100
101} // namespace ProcessLib
std::tuple< double, std::vector< double >, std::vector< double >, std::vector< int >, std::vector< double > > initializeDataContainer() const override
std::tuple< bool, bool, std::vector< double >, std::vector< double > > tespySolver(double t, std::vector< double > const &Tin_val, std::vector< double > const &Tout_val) const override
void serverCommunicationPostTimestep(double const t, double const dt, std::vector< double > const &Tin_val, std::vector< double > const &Tout_val, std::vector< double > const &flowrate) const override
std::tuple< std::vector< double >, std::vector< double > > serverCommunicationPreTimestep(double const t, double const dt, std::vector< double > const &Tin_val, std::vector< double > const &Tout_val, std::vector< double > const &flowrate) const override
virtual std::tuple< bool, bool, std::vector< double >, std::vector< double > > tespySolver(double, std::vector< double > const &, std::vector< double > const &) const
void bheInflowpythonBindBoundaryCondition(pybind11::module &m)
Creates BHE Inflow Python bindings for the Python BC class.