File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -56,12 +56,14 @@ class PiecewiseGrid1D {
5656 grids_[i] = grids[i];
5757 pointTotals_[i] = point_tot;
5858 point_tot += grids[i].nPoints ();
59- const Real diff = std::abs (grids_[i].min () - grids_[i - 1 ].max ());
60- const Real avg =
61- 0.5 * (std::abs (grids_[i].min ()) + std::abs (grids_[i - 1 ].max ()));
62- if ((i > 0 ) && ratio_ (diff, avg) >= EPS_ ()) {
63- PORTABLE_ALWAYS_THROW_OR_ABORT (
64- " Grids must be ordered and intersect at exactly one point." );
59+ if (i > 0 ) {
60+ const Real diff = std::abs (grids_[i].min () - grids_[i - 1 ].max ());
61+ const Real avg =
62+ 0.5 * (std::abs (grids_[i].min ()) + std::abs (grids_[i - 1 ].max ()));
63+ if (ratio_ (diff, avg) >= EPS_ ()) {
64+ PORTABLE_ALWAYS_THROW_OR_ABORT (
65+ " Grids must be ordered and intersect at exactly one point." );
66+ }
6567 }
6668 }
6769 }
You can’t perform that action at this time.
0 commit comments