Leverage particle.move_distance in event advance (#3544)

This commit is contained in:
GuySten 2025-08-22 06:58:39 -08:00 committed by GitHub
parent 5e3249f006
commit d1df80a210
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -247,11 +247,7 @@ void Particle::event_advance()
std::min({boundary().distance(), collision_distance(), distance_cutoff});
// Advance particle in space and time
// Short-term solution until the surface source is revised and we can use
// this->move_distance(distance)
for (int j = 0; j < n_coord(); ++j) {
coord(j).r() += distance * coord(j).u();
}
this->move_distance(distance);
double dt = distance / speed;
this->time() += dt;
this->lifetime() += dt;