Update src/boundary_condition.cpp

Co-authored-by: Guillaume Giudicelli <guillaume.giudicelli@gmail.com>
This commit is contained in:
GuySten 2026-03-10 21:51:13 +02:00 committed by GitHub
parent d749e0cbad
commit 2ca33428c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -46,10 +46,10 @@ void ReflectiveBC::handle_particle(Particle& p, const Surface& surf) const
// Handle phantom birth location if migration present
if (simulation::migration_present) {
auto r = p.r();
const auto & r = p.r();
auto n = surf.normal(r);
n /= n.norm();
auto r_born = p.r_born();
auto & r_born = p.r_born();
p.r_born() = r_born - 2.0 * (r_born - r).dot(n) * n;
}