Merge branch 'time_resolution' of masterduck.fspanier.de:katrin/karl into time_resolution

This commit is contained in:
2024-06-25 10:49:38 +02:00
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -187,7 +187,9 @@ void DriftMover::move(particle::Particle* particle,
// if particle too slow -> timestep > maximum time the particle lives
// -> add maximal timestep to time in bin and stop moving the particle
bool died_in_bin = false;
const double max_time_alive = particle->specie()->terminator()->maxTimeAlive();
const double max_time_alive =
particle->specie()->dynamicDensityField()->physicalTime() -
particle->timeAlive();
while (
!(changed_position_bin || changed_energy_bin || left_simulation_domain) &&
@@ -311,6 +313,9 @@ void DriftMover::move(particle::Particle* particle,
died_in_bin =
particle->specie()->terminator()->reachedMaxTimeAlive(particle);
if(died_in_bin) {
DEBUG_LEVEL_3("Mover: particle died in bin.");
}
changed_position_bin =
particle->specie()->dynamicDensityField()->changedPositionBin(