From 4615dc740bac2e1c29389df47673dafea5baa80e Mon Sep 17 00:00:00 2001 From: thorstenhater <24411438+thorstenhater@users.noreply.github.com> Date: Tue, 16 Jun 2020 08:07:12 +0200 Subject: [PATCH] Make dt optional parameter to model.run. (#1064) --- python/single_cell_model.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/python/single_cell_model.cpp b/python/single_cell_model.cpp index b71987cf..dfba5158 100644 --- a/python/single_cell_model.cpp +++ b/python/single_cell_model.cpp @@ -171,7 +171,7 @@ public: gprop_.add_ion(ion, valence, int_con, ext_con, rev_pot); } - void run(double tfinal) { + void run(double tfinal, double dt) { single_cell_recipe rec(cell_, probes_, gprop_); auto domdec = arb::partition_load_balance(rec, ctx_); @@ -201,7 +201,7 @@ public: } }); - sim_->run(tfinal, 0.025); + sim_->run(tfinal, dt); run_ = true; } @@ -233,7 +233,11 @@ void register_single_cell(pybind11::module& m) { model .def(pybind11::init<arb::cable_cell>(), "cell"_a, "Initialise a single cell model for a cable cell.") - .def("run", &single_cell_model::run, "tfinal"_a, "Run model from t=0 to t=tfinal ms.") + .def("run", + &single_cell_model::run, + "tfinal"_a, + "dt"_a = 0.025, + "Run model from t=0 to t=tfinal ms.") .def("probe", [](single_cell_model& m, const char* what, const char* where, double frequency) { m.probe(what, where, frequency);}, -- GitLab