mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Fix surface coincidence check in CSGCell::distance
This commit is contained in:
parent
ef2767a127
commit
50fb611272
1 changed files with 1 additions and 1 deletions
|
|
@ -424,7 +424,7 @@ CSGCell::distance(Position r, Direction u, int32_t on_surface) const
|
|||
|
||||
// Calculate the distance to this surface.
|
||||
// Note the off-by-one indexing
|
||||
bool coincident {token == on_surface};
|
||||
bool coincident {std::abs(token) == std::abs(on_surface)};
|
||||
double d {model::surfaces[abs(token)-1]->distance(r, u, coincident)};
|
||||
|
||||
// Check if this distance is the new minimum.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue