CEMeNT-PSAAP / MCDC

MC/DC: Monte Carlo Dynamic Code
https://mcdc.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
20 stars 20 forks source link

"A particle is lost" recursive loop #180

Open spasmann opened 5 months ago

spasmann commented 5 months ago

Running the 2D C5G7, I've run into a "Particle is lost" bug using both Monte Carlo and iQMC. A particle being lost could be due to an error in the input deck created by the user. So I'm not as concerned that a particle was lost, but that the "Particle is Lost" statement repeats infinitely. Shouldn't it print the error, kill the particle, and move on?

When get_particle_cell() fails to find a cell_ID we set:

However, it gets stuck in this recursive loop where it repeats the "Particle is Lost" statement, until the output file exceeds my disk quote and the run fails.

Sample of output:

A particle is lost at ( 16.612528973121755 -3.824586145564854 10000000000.0 )
A particle is lost at ( 16.612528973121755 -3.824586145564854 10000000000.0 )
A particle is lost at ( 16.612528973121755 -3.824586145564854 10000000000.0 )
A particle is lost at ( 16.612528973121755 -3.824586145564854 10000000000.0 )