diff --git a/exercice_4/src/pypart_pybind.cc b/exercice_4/src/pypart_pybind.cc index e684563..00285b3 100644 --- a/exercice_4/src/pypart_pybind.cc +++ b/exercice_4/src/pypart_pybind.cc @@ -1,37 +1,38 @@ #include "material_points_factory.hh" #include "particles_factory_interface.hh" #include "ping_pong_balls_factory.hh" #include "planets_factory.hh" +//#include "compute_temperatures.hh" #include namespace py = pybind11; PYBIND11_MODULE(pypart, m) { m.doc() = "pybind for particles code"; py::class_(m, "ParticlesFactoryInterface") .def("getInstance", &ParticlesFactoryInterface::getInstance) .def("createSimulation", &ParticlesFactoryInterface::createSimulation); py::class_( m, "MaterialPointsFactory") .def("getInstance", &MaterialPointsFactory::getInstance) /*.def("createSimulation", py::overload_cast( &MaterialPointsFactory::createSimulation)) // no need for py::overload_cast .def("createSimulation", py::overload_cast( &MaterialPointsFactory::createSimulation)); */ .def("createSimulation", // less elegant way to do the overload cast --> forum - (SystemEvolution& (MaterialPointsFactory::*)(const std::string &, Real)) & MaterialPointsFactory::createSimulation - ) + (SystemEvolution& (MaterialPointsFactory::*)(const std::string &, Real)) & MaterialPointsFactory::createSimulation + ); py::class_( m, "PingPongBallsFactory") .def("getInstance", &PingPongBallsFactory::getInstance) .def("createSimulation", &PingPongBallsFactory::createSimulation); py::class_(m, "PlanetsFactory") .def("getInstance", &PlanetsFactory::getInstance) .def("createSimulation", &PlanetsFactory::createSimulation); }