diff --git a/dumux/python/common/timeloop.hh b/dumux/python/common/timeloop.hh index 95d14954957e1e96018793331ce0e77959e37e61..57a33f25b9344b6cb41d8b273d136906fc348e6a 100644 --- a/dumux/python/common/timeloop.hh +++ b/dumux/python/common/timeloop.hh @@ -35,13 +35,21 @@ void registerTimeLoop(pybind11::handle scope, cls.def_property_readonly("finished", &TimeLoop::finished); cls.def_property_readonly("isCheckPoint", &TimeLoop::isCheckPoint); cls.def("start", &TimeLoop::start); - cls.def("reset", &TimeLoop::reset, "startTime"_a, "dt"_a, "endTime"_a, "verbose"_a=true); + cls.def( + "reset", + static_cast<void(TimeLoop::*)(Scalar, Scalar, Scalar, bool)>(&TimeLoop::reset), + "startTime"_a, "dt"_a, "endTime"_a, "verbose"_a=true + ); cls.def("advanceTimeStep", &TimeLoop::advanceTimeStep); - cls.def("setTimeStepSize", &TimeLoop::setTimeStepSize, "dt"_a); - cls.def("setMaxTimeStepSize", &TimeLoop::setMaxTimeStepSize, "dt"_a); + cls.def("setTimeStepSize", static_cast<void(TimeLoop::*)(Scalar)>(&TimeLoop::setTimeStepSize), "dt"_a); + cls.def("setMaxTimeStepSize", &TimeLoop::template setMaxTimeStepSize<Scalar>, "dt"_a); cls.def("reportTimeStep", &TimeLoop::reportTimeStep); cls.def("finalize", [](TimeLoop& self){ self.finalize(); }); - cls.def("setPeriodicCheckPoint", &TimeLoop::setPeriodicCheckPoint, "interval"_a, "offset"_a=0.0); + cls.def( + "setPeriodicCheckPoint", + &TimeLoop::template setPeriodicCheckPoint<Scalar, Scalar>, + "interval"_a, "offset"_a=0.0 + ); cls.def("setCheckPoints", [](TimeLoop& self, const std::vector<double>& checkPoints) { self.setCheckPoint(checkPoints); });