aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/interpolate_3d_3tl.cc
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2013-08-08 13:08:01 -0400
committerErik Schnetter <schnetter@gmail.com>2013-08-08 13:08:01 -0400
commitfc35c561a049d905763de37d60690fc15473d65d (patch)
treed75b9bf47d98c31b88d64c306955f47d33961c10 /Carpet/CarpetLib/src/interpolate_3d_3tl.cc
parent2ee083f401442bcca7265de784e1b0f00a185c25 (diff)
CarpetLib: Some harmless code cleanup
Use CCTK_Error and CCTK_BUILTIN_UNREACHABLE
Diffstat (limited to 'Carpet/CarpetLib/src/interpolate_3d_3tl.cc')
-rw-r--r--Carpet/CarpetLib/src/interpolate_3d_3tl.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/Carpet/CarpetLib/src/interpolate_3d_3tl.cc b/Carpet/CarpetLib/src/interpolate_3d_3tl.cc
index 6e39691f3..160747d96 100644
--- a/Carpet/CarpetLib/src/interpolate_3d_3tl.cc
+++ b/Carpet/CarpetLib/src/interpolate_3d_3tl.cc
@@ -59,23 +59,23 @@ namespace CarpetLib {
if (any (srcbbox.stride() != regbbox.stride() or
dstbbox.stride() != regbbox.stride()))
{
- CCTK_WARN (0, "Internal error: strides disagree");
+ CCTK_ERROR("Internal error: strides disagree");
}
if (any (srcbbox.stride() != dstbbox.stride())) {
- CCTK_WARN (0, "Internal error: strides disagree");
+ CCTK_ERROR("Internal error: strides disagree");
}
// This could be handled, but is likely to point to an error
// elsewhere
if (regbbox.empty()) {
- CCTK_WARN (0, "Internal error: region extent is empty");
+ CCTK_ERROR("Internal error: region extent is empty");
}
if (not regbbox.is_contained_in(srcbbox) or
not regbbox.is_contained_in(dstbbox))
{
- CCTK_WARN (0, "Internal error: region extent is not contained in array extent");
+ CCTK_ERROR("Internal error: region extent is not contained in array extent");
}
@@ -123,10 +123,12 @@ namespace CarpetLib {
RT const eps = 1.0e-10;
if (fabs (t1 - t2) < eps or fabs (t1 - t3) < eps or fabs (t2 - t3) < eps) {
- CCTK_WARN (0, "Internal error: arrays have same time");
+ CCTK_ERROR("Internal error: arrays have same time");
}
- if (t < min (min (t1, t2), t3) - eps or t > max (max (t1, t2), t3) + eps) {
- CCTK_WARN (0, "Internal error: extrapolation in time");
+ if (t < fmin (fmin (t1, t2), t3) - eps or
+ t > fmax (fmax (t1, t2), t3) + eps)
+ {
+ CCTK_ERROR("Internal error: extrapolation in time");
}
RT const s1fac = (t - t2) * (t - t3) / ((t1 - t2) * (t1 - t3));