49#pragma GCC visibility push(hidden)
64 py::object ret =
m_cb(in, time);
66 py::list outList = py::cast<py::list>(ret);
68 for (std::size_t i = 0; i < py::len(outList); ++i)
70 out[i] = py::cast<Array<OneD, NekDouble>>(outList[i]);
78#pragma GCC visibility pop
86#pragma GCC visibility push(hidden)
101 py::object ret =
m_cb(in, time, lambda);
103 py::list outList = py::cast<py::list>(ret);
105 for (std::size_t i = 0; i < py::len(outList); ++i)
107 out[i] = py::cast<Array<OneD, NekDouble>>(outList[i]);
115#pragma GCC visibility pop
144 std::shared_ptr<TimeIntegrationSchemeOperators>>(
145 m,
"TimeIntegrationSchemeOperators")
147 .def(
"DefineProjection",
149 .def(
"DefineImplicitSolve",
void TimeIntegrationSchemeOperators_DefineOdeRhs(TimeIntegrationSchemeOperatorsSharedPtr op, py::object callback)
void TimeIntegrationSchemeOperators_DefineImplicitSolve(TimeIntegrationSchemeOperatorsSharedPtr op, py::object callback)
void TimeIntegrationSchemeOperators_DefineProjection(TimeIntegrationSchemeOperatorsSharedPtr op, py::object callback)
void export_TimeIntegrationSchemeOperators(py::module &m)
Binds a set of functions for use by time integration schemes.
std::shared_ptr< TimeIntegrationSchemeOperators > TimeIntegrationSchemeOperatorsSharedPtr
Helper class for holding a reference to a Python function to act as a wrapper for TimeIntegrationSche...
void call(TimeIntegrationSchemeOperators::InArrayType &in, TimeIntegrationSchemeOperators::OutArrayType &out, const NekDouble time)
C++ callback function to invoke Python function stored in m_cb.
CallbackHolderT1(py::object cb)
Default constructor.
py::object m_cb
Callback defined in Python code.
Helper class for holding a reference to a Python function to act as a wrapper for TimeIntegrationSche...
void call(TimeIntegrationSchemeOperators::InArrayType &in, TimeIntegrationSchemeOperators::OutArrayType &out, const NekDouble time, const NekDouble lambda)
C++ callback function to invoke Python function stored in m_cb.
py::object m_cb
Callback defined in Python code.
CallbackHolderT2(py::object cb)
Default constructor.