mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Updating history reset to account for reflective boundaries. Adding mark as lost warning when no intersection is found.
This commit is contained in:
parent
0bd2f9263b
commit
9c2f9b523b
1 changed files with 3 additions and 4 deletions
|
|
@ -816,10 +816,8 @@ DAGCell::distance(Position r, Direction u, int32_t on_surface, Particle* p) cons
|
|||
Expects(p);
|
||||
// if we've changed direction or we're not on a surface,
|
||||
// reset the history and update last direction
|
||||
if (u != p->last_dir() || on_surface == 0) {
|
||||
p->history().reset();
|
||||
p->last_dir() = u;
|
||||
}
|
||||
if (u != p->last_dir()) { p->last_dir() = u; p->history().reset(); }
|
||||
if (on_surface == 0) { p->history().reset(); }
|
||||
|
||||
const auto& univ = model::universes[p->coord_[p->n_coord_ - 1].universe];
|
||||
|
||||
|
|
@ -841,6 +839,7 @@ DAGCell::distance(Position r, Direction u, int32_t on_surface, Particle* p) cons
|
|||
// indicate that particle is lost
|
||||
surf_idx = -1;
|
||||
dist = INFINITY;
|
||||
p->mark_as_lost(fmt::format("No intersection found with DAGMC cell {}", id_));
|
||||
}
|
||||
|
||||
return {dist, surf_idx};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue