Skip to content

Commit

Permalink
Update grid.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Mar 7, 2025
1 parent 9a09c20 commit 2760f8e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions grid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2602,9 +2602,10 @@ auto get_totmassradionuclide(const int z, const int a) -> double {
const double maxsdist = (GRID_TYPE == GridType::CARTESIAN3D)
? globals::rmax * tstart / globals::tmin
: 2 * globals::rmax * (tstart + distance / CLIGHT_PROP) / globals::tmin;

if (distance > maxsdist) {
printout("[fatal] Unreasonably large boundary dist. Abort. %g %g %g\n", globals::rmax, tstart / globals::tmin,
distance);
printout("ERROR: boundary_distance(): Unreasonably large boundary dist. Abort. %g %g %g\n", globals::rmax,
tstart / globals::tmin, distance);
std::abort();
}

Expand All @@ -2615,11 +2616,7 @@ auto get_totmassradionuclide(const int z, const int a) -> double {
snext = cellindex;
}

if (distance < 0) {
printout("[warning] Negative distance to next cell boundary (distance = %g). Abort.\n", distance);
assert_always(false);
}

assert_always(distance > 0);
assert_testmodeonly(snext == -99 || snext >= 0);
assert_testmodeonly(snext < ngrid);

Expand Down

0 comments on commit 2760f8e

Please sign in to comment.