Fixed bug of max Interactions not getting logged,
Added functionality to cluster_formation entry, added logging of recombination
This commit is contained in:
@@ -65,6 +65,7 @@ void Simulation::init(Parameter& parameter) {
|
||||
|
||||
DEBUG_LEVEL_0("Init cpu synchronizer.");
|
||||
cpu_synchronizer_ = std::make_shared<CpuSynchronizer>();
|
||||
DEBUG_LEVEL_3("Init done.");
|
||||
}
|
||||
|
||||
int eventsThisCpu(int events_all_cpus) {
|
||||
@@ -210,15 +211,7 @@ void Simulation::processUntilTermination(
|
||||
was_reflected = true;
|
||||
}
|
||||
|
||||
if (particle.specie()->terminator()->reachedMaxInteractions(&particle)) {
|
||||
DEBUG_LEVEL_3("Terminate particle " + particle.specie()->name()
|
||||
+ ". Reached max interactions.");
|
||||
if (particle.specie()->deletionLogger()) {
|
||||
particle.specie()->deletionLogger()->logDeletion(
|
||||
particle.position(), DeletionType::max_interactions);
|
||||
}
|
||||
break;
|
||||
} else if (particle.specie()->terminator()->reachedMaxTimeAlive(
|
||||
if (particle.specie()->terminator()->reachedMaxTimeAlive(
|
||||
&particle)) {
|
||||
DEBUG_LEVEL_3("Terminate particle " + particle.specie()->name()
|
||||
+". Reached max time alive.");
|
||||
@@ -268,8 +261,19 @@ void Simulation::processUntilTermination(
|
||||
}
|
||||
|
||||
if (output.deleteCurrentParticle()) {
|
||||
DEBUG_LEVEL_3(particle.specie()->name() + " removed due to interaction.");
|
||||
break;
|
||||
}
|
||||
|
||||
if (particle.specie()->terminator()->reachedMaxInteractions(&particle)) {
|
||||
DEBUG_LEVEL_3("Terminate particle " + particle.specie()->name()
|
||||
+ ". Reached max interactions.");
|
||||
if (particle.specie()->deletionLogger()) {
|
||||
particle.specie()->deletionLogger()->logDeletion(
|
||||
particle.position(), DeletionType::max_interactions);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user