35 register_polymorphic_to_python<polymorphic<ExplicitIntegratorAbstract>>();
36 bp::class_<PyExplicitIntegrator, bp::bases<ExplicitDynamics>,
37 boost::noncopyable>(
"ExplicitIntegratorAbstract",
38 bp::init<const polymorphic<ODEType> &>(
39 "Construct the integrator from an ODE.",
40 bp::args(
"self",
"cont_dynamics")))
41 .def_readonly(
"nx2", &ExplicitIntegratorAbstract::nx2,
42 "Next state dimension.")
43 .def_readwrite(
"differential_dynamics", &ExplicitIntegratorAbstract::ode_,
44 "The underlying differential equation.")
47 .def(conversions_visitor);
49 bp::register_ptr_to_python<shared_ptr<ExplicitIntegratorData>>();
50 bp::class_<ExplicitIntegratorData, bp::bases<ExplicitDynamicsData>>(
51 "ExplicitIntegratorData",
"Data struct for explicit time integrators.",
53 .def_readwrite(
"continuous_data",
54 &ExplicitIntegratorData::continuous_data);
56 bp::class_<IntegratorEulerTpl<Scalar>, bp::bases<ExplicitIntegratorAbstract>>(
58 "The explicit Euler integrator :math:`x' = x \\oplus \\Delta t f(x, u)`; "
59 "this integrator has error :math:`O(\\Delta t)` "
60 "in the time step :math:`\\Delta t`.",
61 bp::init<const polymorphic<ODEType> &, Scalar>(
62 bp::args(
"self",
"ode",
"timestep")))
65 .def(conversions_visitor);
67 bp::class_<IntegratorSemiImplEulerTpl<Scalar>,
68 bp::bases<ExplicitIntegratorAbstract>>(
69 "IntegratorSemiImplEuler",
"The semi implicit Euler integrator.",
70 bp::init<const polymorphic<ODEType> &, Scalar>(
71 bp::args(
"self",
"ode",
"timestep")))
74 .def(conversions_visitor);
75 bp::class_<IntegratorSemiImplDataTpl<Scalar>,
76 bp::bases<ExplicitIntegratorData>>(
"IntegratorSemiImplData",
79 bp::class_<IntegratorRK2Tpl<Scalar>, bp::bases<ExplicitIntegratorAbstract>>(
80 "IntegratorRK2", bp::init<const polymorphic<ODEType> &, Scalar>(
81 bp::args(
"self",
"ode",
"timestep")))
84 .def(conversions_visitor);
86 bp::class_<IntegratorRK2DataTpl<Scalar>, bp::bases<ExplicitIntegratorData>>(
87 "IntegratorRK2Data", bp::no_init);