diff --git a/homework4/starting_point/.idea/workspace.xml b/homework4/starting_point/.idea/workspace.xml
index 00f71ad..701b64c 100644
--- a/homework4/starting_point/.idea/workspace.xml
+++ b/homework4/starting_point/.idea/workspace.xml
@@ -1,391 +1,408 @@
-
+
+
+
-
+
-
+
-
+
-
-
+
+
-
+
+
+
+
+
+
+
+
-
+
+
-
-
+
+
+
+
+
true
DEFINITION_ORDER
1545641844292
1545641844292
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
-
+
-
+
+
-
+
\ No newline at end of file
diff --git a/homework4/starting_point/py_part.cpp b/homework4/starting_point/py_part.cpp
index b884181..696885b 100644
--- a/homework4/starting_point/py_part.cpp
+++ b/homework4/starting_point/py_part.cpp
@@ -1,33 +1,40 @@
#include
#include
#include
#include "particles_factory_interface.hh"
#include "planets_factory.hh"
#include "ping_pong_balls_factory.hh"
#include "material_points_factory.hh"
namespace py = pybind11;
PYBIND11_MODULE(pypart, m) {
m.doc() = "pybind particle plugin"; // optional docstring
// wrap the class
py::class_(m, "ParticlesFactoryInterface")
.def("getInstance", &ParticlesFactoryInterface::getInstance,
- py::return_value_policy::reference);
+ py::return_value_policy::reference);
py::class_(m, "PingPongBallsFactory")
.def("getInstance", &PingPongBallsFactory::getInstance,
- py::return_value_policy::reference);
+ py::return_value_policy::reference)
+ .def("createSimulation", &PingPongBallsFactory::createSimulation);
py::class_(m, "PlanetsFactory")
.def("getInstance", &PlanetsFactory::getInstance,
- py::return_value_policy::reference);
+ py::return_value_policy::reference)
+ .def("createSimulation", &PlanetsFactory::createSimulation);
py::class_(m, "MaterialPointsFactory")
.def("getInstance", &MaterialPointsFactory::getInstance,
- py::return_value_policy::reference);
+ py::return_value_policy::reference)
+ .def("createSimulation",
+ (SystemEvolution & (MaterialPointsFactory::*)(const std::string &, Real))
+ &MaterialPointsFactory::createSimulation
+ )
+ .def("createSimulation", &MaterialPointsFactory::createSimulation);
}