Fixed bug of max Interactions not getting logged,
Added functionality to cluster_formation entry, added logging of recombination
This commit is contained in:
@@ -60,6 +60,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) {
|
||||
@@ -187,15 +188,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. Reached max time alive.");
|
||||
if (particle.specie()->deletionLogger()) {
|
||||
@@ -242,8 +235,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