Restructuring of poisson solver offset;

inclusion of stride for poisson solver
This commit is contained in:
2024-03-28 15:57:04 +01:00
parent 26f730ca29
commit 52a580ac63
4 changed files with 60 additions and 39 deletions
+3 -8
View File
@@ -97,10 +97,6 @@ void Simulation::start() {
parameter_.intValue(json_path({"Simulation", "EventStride"}), 1);
const int total_simulated_events =
parameter_.intValue(json_path({"Simulation", "SimulatedEvents"}), 1);
// Minimum number of cpu syncs before the potential is done the first time
// afterwards the potential is recalculated every cpu sync (maybe change to a stride)
const int poisson_offset =
parameter_.intValue(json_path({"Simulation", "PoissonOffset"}), 0);
SIM_INFO("Total simulated events: " + std::to_string(total_simulated_events));
SIM_INFO("Simulated events before cpu sync: " + std::to_string(event_stride));
const int events_this_cpu = eventsThisCpu(total_simulated_events);
@@ -125,10 +121,9 @@ void Simulation::start() {
SIM_INFO("Poisson step.");
SimulationTimer::eventStartPoint(std::string("PoissonStep"));
if(num_cpu_syncs > poisson_offset) {
poisson_solver_->solvePotential(chargedensity());
electric_field_->updateDynamicField(poisson_solver_->staticElectricField());
}
poisson_solver_->solvePotential(chargedensity(), num_cpu_syncs);
electric_field_->updateDynamicField(poisson_solver_->staticElectricField());
SimulationTimer::eventStopPoint(std::string("PoissonStep"));
SIM_INFO("Perform output.");