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
+1 -18
View File
@@ -265,12 +265,6 @@ void SpeciesBuilder::fillTrackedDensity(Parameter& parameter) {
json_path_append(b.second.path_in_json,
{"DensityField", "DynamicDensityField"}),
timer_);
b.second.last_sync_density_field = buildDynamicDensityField(
parameter,
json_path_append(b.second.path_in_json,
{"DensityField", "DynamicDensityField"}),
last_sync_timer_);
}
}
@@ -290,8 +284,7 @@ void SpeciesBuilder::buildSpecies() {
b.second.type, b.second.name, b.second.mass_kg, b.second.charge_C,
b.second.mover, b.second.terminator, b.second.reflector,
b.second.density_field, b.second.velocity_distribution,
b.second.drift_velocity, b.second.last_sync_density_field,
b.second.density_drawing_field));
b.second.drift_velocity, b.second.density_drawing_field));
}
}
@@ -303,15 +296,7 @@ void SpeciesBuilder::fillCurrentCollector(Parameter& parameter) {
json_path_append(tracked_species_info.at(b.first).path_in_json,
{"CurrentCollector"}),
timer_);
// has to be recreated, if it would be copied the timer_ pointer would
// point to the same object -> could not get updated during synchronization
auto last_sync_current_collector = buildCurrentCollector(
parameter,
json_path_append(tracked_species_info.at(b.first).path_in_json,
{"CurrentCollector"}),
last_sync_timer_);
b.second->currentCollector(current_collector);
b.second->lastSyncCurrentCollector(last_sync_current_collector);
}
}
@@ -323,8 +308,6 @@ void SpeciesBuilder::fillLoggers(Parameter& parameter) {
json_path_append(tracked_species_info.at(b.first).path_in_json,
{"Loggers"}));
b.second->deletionLogger(deletion_logger);
b.second->lastSyncDeletionLogger(
std::make_shared<DeletionLogger>(*deletion_logger));
}
}