diff --git a/src/mc_electron/katrin.hpp b/src/mc_electron/katrin.hpp index 78e513f..7938486 100644 --- a/src/mc_electron/katrin.hpp +++ b/src/mc_electron/katrin.hpp @@ -54,11 +54,11 @@ private: // Terminate Electrons public: bool check_Termination(Electron checkElectron); +private: bool check_EnergyTermination(double Ekin_eV); bool check_EnergyTermination(Electron checkElectron); bool check_WallTermination(vec3 loc_m); bool check_WallTermination(Electron checkElectron); -private: double cutoffEnergy_eV; void set_cutoffEnergy_eV(); }; diff --git a/src/mc_electron/simulation.cpp b/src/mc_electron/simulation.cpp index 9e377e0..da9983d 100644 --- a/src/mc_electron/simulation.cpp +++ b/src/mc_electron/simulation.cpp @@ -19,6 +19,7 @@ using namespace std; Simulation::Simulation() { numberElectrons = 0; rngUni.seed(seed); + updater_fraction = numTotalElectrons/100; updater_numberOfPrevious = 0; } @@ -33,10 +34,10 @@ void Simulation::doit() { status_updater(); move_electron(&electronQue.front(), &Log); - if (!Kat.check_EnergyTermination (electronQue.front()) ) { + if (!Kat.check_Termination (electronQue.front()) ) { do_interaction(&electronQue.front()); } - if (Kat.check_EnergyTermination (electronQue.front())) { + if (Kat.check_Termination (electronQue.front())) { electronQue.pop_front(); } } @@ -60,7 +61,7 @@ void Simulation::doTC6() { }; void Simulation::status_updater() { - if (numberElectrons%100 == 0){ + if (numberElectrons%updater_fraction == 0){ if (updater_numberOfPrevious!=numberElectrons) { cout< electronQue; int updater_numberOfPrevious; + int updater_fraction; public: void doTC6();