mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Update src/boundary_condition.cpp
Co-authored-by: Guillaume Giudicelli <guillaume.giudicelli@gmail.com>
This commit is contained in:
parent
d749e0cbad
commit
2ca33428c2
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue