Bug fixed, where check_EnergyTermination was used instead of check_Termination.
Changed check_EnergyTermination and check_WallTermination to private methods. Minor change for status updater: Set updater Rate to 1% steps.
This commit is contained in:
@@ -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<<numberElectrons<<"/"<<numTotalElectrons<<endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user