OGS
BHEInflowPythonBoundaryConditionModule.cpp
Go to the documentation of this file.
1 
12 
13 #include <pybind11/stl.h>
14 
16 
17 namespace ProcessLib
18 {
24 {
25 public:
26  using BHEInflowPythonBoundaryConditionPythonSideInterface::
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>> serverCommunication(
53  double const t, double const dt, std::vector<double> const& Tin_val,
54  std::vector<double> const& Tout_val,
55  std::vector<double> const& flowrate) const override
56  {
57  using Ret = std::tuple<std::vector<double>, std::vector<double>>;
58  PYBIND11_OVERLOAD(
60  serverCommunication, t, dt, Tin_val, Tout_val, flowrate);
61  }
62 };
63 
64 void bheInflowpythonBindBoundaryCondition(pybind11::module& m)
65 {
66  namespace py = pybind11;
67 
70  pybc(m, "BHENetwork");
71 
72  pybc.def(py::init());
73 
74  pybc.def("initializeDataContainer",
76  initializeDataContainer);
77  pybc.def("tespySolver",
79 
80  pybc.def("serverCommunication",
82  serverCommunication);
83 }
84 
85 } // 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
std::tuple< std::vector< double >, std::vector< double > > serverCommunication(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.