aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@df1f8a13-aa1d-4dd4-9681-27ded5b42416>2003-08-01 16:07:56 +0000
committertradke <tradke@df1f8a13-aa1d-4dd4-9681-27ded5b42416>2003-08-01 16:07:56 +0000
commit2ce759569285e788385d5c300bf05aa7dcb9c413 (patch)
tree3cc36671e202a9e95eeece2c6a4ae45b18865e0d
parente39ea546180026269531265180318ef7e148f920 (diff)
More informative warning message for out-of-bounds interpolation points.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/LocalInterp/trunk@169 df1f8a13-aa1d-4dd4-9681-27ded5b42416
-rw-r--r--src/Interpolate.c47
1 files changed, 25 insertions, 22 deletions
diff --git a/src/Interpolate.c b/src/Interpolate.c
index ed05ae8..22e7041 100644
--- a/src/Interpolate.c
+++ b/src/Interpolate.c
@@ -418,38 +418,41 @@ if (n == LocalInterp_verbose_debug_n)
if (num_dims == 1)
{
CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,
- "Interpolation stencil/molecule out of bounds "
- "at grid point [%d]\n"
- "range would be min/max [%f / %f]\n"
- "grid is min/max [%f / %f]",
- point[0],
- (double) below[0], (double) (below[0] + offset[0]),
+ "Interpolation stencil/molecule out of bounds\n"
+ " (the interpolation point is either outside the grid, "
+ "or inside but too close to a grid boundary)\n"
+ " for interpolation order %d\n"
+ " at interpolation point %d with x = (%f)\n"
+ " and grid min/max = (%f/%f)\n",
+ order, n,
+ (double) coord[0][n],
(double) origin[0], (double) (origin[0] + (dims[0]-1)*delta[0]));
}
else if (num_dims == 2)
{
CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,
- "Interpolation stencil/molecule out of bounds "
- "at grid point [%d, %d]\n"
- "range would be min/max [%f / %f, %f / %f]\n"
- "grid is min/max [%f / %f, %f / %f]",
- point[0], point[1],
- (double) below[0], (double) (below[0] + offset[0]),
- (double) below[1], (double) (below[1] + offset[1]),
+ "Interpolation stencil/molecule out of bounds\n"
+ " (the interpolation point is either outside the grid, "
+ "or inside but too close to a grid boundary)\n"
+ " for interpolation order %d\n"
+ " at interpolation point %d with xy = (%f, %f)\n"
+ " and grid min/max = (%f/%f, %f/%f)\n",
+ order, n,
+ (double) coord[0][n], (double) coord[1][n],
(double) origin[0], (double) (origin[0] + (dims[0]-1)*delta[0]),
(double) origin[1], (double) (origin[1] + (dims[1]-1)*delta[1]));
}
else if (num_dims == 3)
{
- CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,
- "Interpolation stencil/molecule out of bounds "
- "at grid point [%d, %d, %d]\n"
- "range would be min/max [%f / %f, %f / %f, %f / %f]\n"
- "grid is min/max [%f / %f, %f / %f, %f / %f]",
- point[0], point[1], point[2],
- (double) below[0], (double) (below[0] + offset[0]),
- (double) below[1], (double) (below[1] + offset[1]),
- (double) below[2], (double) (below[2] + offset[2]),
+ CCTK_VWarn (0, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "Interpolation stencil/molecule out of bounds\n"
+ " (the interpolation point is either outside the grid, "
+ "or inside but too close to a grid boundary)\n"
+ " for interpolation order %d\n"
+ " at interpolation point %d with xyz = (%f, %f, %f)\n"
+ " and grid min/max = (%f/%f, %f/%f, %f/%f)\n",
+ order, n,
+ (double) coord[0][n], (double) coord[1][n], (double) coord[2][n],
(double) origin[0], (double) (origin[0] + (dims[0]-1)*delta[0]),
(double) origin[1], (double) (origin[1] + (dims[1]-1)*delta[1]),
(double) origin[2], (double) (origin[2] + (dims[2]-1)*delta[2]));