restructured fields for cpu sync;

no longer whole object in species but additional
fields in the corresponding classes
This commit is contained in:
2024-08-13 15:00:13 +02:00
parent 9dda12b60a
commit 2e5923ab6f
12 changed files with 93 additions and 106 deletions
+4 -3
View File
@@ -164,18 +164,15 @@ void Simulation::start() {
timer_->increaseTimestep(delta_t);
for(auto& pair : tracked_species_) {
pair.second->dynamicDensityField()->resetDynamicDensityField();
pair.second->lastSyncDensityField()->resetDynamicDensityField();
// questionable if they need to be reset:
// + time res in current
// - ions very slow -> very unlikely that an ion crosses a boundary
pair.second->currentCollector()->resetCurrentCollector();
pair.second->lastSyncCurrentCollector()->resetCurrentCollector();
// do not need to be reset, since the time resolution considers the same
// set of particles
// pair.second->deletionLogger()->resetDeletionLogger();
// pair.second->lastSyncDeletionLogger()->resetDeletionLogger();
}
leftover_events_time_resolution = time_resolution_this_cpu;
}
@@ -277,6 +274,10 @@ void Simulation::processUntilTermination(
&particle)) {
DEBUG_LEVEL_3("Terminate particle " + particle.specie()->name() +
". Reached timeresolution.");
if(particle.specie()->deletionLogger()) {
particle.specie()->deletionLogger()->logDeletion(particle.position(),
DeletionType::max_time_alive);
}
break;
} else if (particle.specie()->terminator()->leftSimulationDomain(
&particle)) {