mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Merge pull request #2075 from paulromano/infinite-loop-bugfix
Bug fix for rare infinite loop when finding cell after surface crossing
This commit is contained in:
commit
ba0c193a31
1 changed files with 2 additions and 2 deletions
|
|
@ -454,8 +454,7 @@ void Particle::cross_surface()
|
|||
// ==========================================================================
|
||||
// COULDN'T FIND PARTICLE IN NEIGHBORING CELLS, SEARCH ALL CELLS
|
||||
|
||||
// Remove lower coordinate levels and assignment of surface
|
||||
surface() = 0;
|
||||
// Remove lower coordinate levels
|
||||
n_coord() = 1;
|
||||
bool found = exhaustive_find_cell(*this);
|
||||
|
||||
|
|
@ -465,6 +464,7 @@ void Particle::cross_surface()
|
|||
// the particle is really traveling tangent to a surface, if we move it
|
||||
// forward a tiny bit it should fix the problem.
|
||||
|
||||
surface() = 0;
|
||||
n_coord() = 1;
|
||||
r() += TINY_BIT * u();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue