48 for (
int i = 0; i < in.size(); ++i)
50 ret.append(py::object(in[i]));
77 py::object ret =
m_cb(in, time);
79 py::list outList = py::extract<py::list>(ret);
81 for (std::size_t i = 0; i < py::len(outList); ++i)
83 out[i] = py::extract<Array<OneD, NekDouble>>(outList[i]);
112 py::object ret =
m_cb(in, time, lambda);
114 py::list outList = py::extract<py::list>(ret);
116 for (std::size_t i = 0; i < py::len(outList); ++i)
118 out[i] = py::extract<Array<OneD, NekDouble>>(outList[i]);
154 std::shared_ptr<TimeIntegrationSchemeOperators>,
155 boost::noncopyable>(
"TimeIntegrationSchemeOperators",
158 .def(
"DefineProjection",
160 .def(
"DefineImplicitSolve",
py::list ArrayOneDToPyList(const Array< OneD, const Array< OneD, NekDouble > > &in)
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()
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.