Adjusted convergence criterion, included

json file with examplary use of the poisson solver
This commit is contained in:
2024-01-26 15:45:02 +01:00
parent ffc65f8ef9
commit 3a802d8f8d
3 changed files with 686 additions and 50 deletions
+4 -2
View File
@@ -155,7 +155,7 @@ void Simulation::processEvents(int events) {
particle_queue.insert(particle_queue.end(), new_particles.begin(),
new_particles.end());
}
DEBUG_LEVEL_2("Particles in queue: " + particle_queue.size());
DEBUG_LEVEL_2("Particles in queue: " + std::to_string(particle_queue.size()));
const int particle_number =
particleNumberFromQueue(particle_queue.size(), random_.get());
@@ -319,11 +319,13 @@ blitz::Array<double,3> Simulation::chargedensity() {
blitz::Array<double,3> init = firstTracked->dynamicDensityField()->densityArray();
blitz::Array<double, 3> chargeden(init.lbound(), init.extent());
chargeden = 0.;
DEBUG_LEVEL_3("Collect chargedensity");
for (auto& pair : tracked_species_) {
chargeden += pair.second->charge_C() * pair.second->dynamicDensityField()->
densityArray();
}
DEBUG_LEVEL_3("Maximum value in the chargedensity: " + std::to_string(blitz::max(chargeden)));
return chargeden;
}