From 3cab8cc08bc3cd48f1883e89167311266979bc41 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 23 Jul 2019 17:52:00 +0200 Subject: [PATCH] Fixed bug where throwing error if both calcPop parameters were 0. --- src/mc_electron/simulation.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mc_electron/simulation.cpp b/src/mc_electron/simulation.cpp index b612fbb..ec523fa 100644 --- a/src/mc_electron/simulation.cpp +++ b/src/mc_electron/simulation.cpp @@ -133,6 +133,9 @@ void Simulation::doit() { }; void Simulation::do_cycle(long int number_total, long int step_size, bool logging) { + if (number_total == 0) { + return; + } if (step_size <1) { stringstream ss; ss<<"Simulation::do_cycle: invalid step_size. \n";