aboutsummaryrefslogtreecommitdiff
path: root/src/gr
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-04-21 18:50:22 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-04-21 18:50:22 +0000
commit796eb7b435611183170ab8fe55363ca85264c662 (patch)
treebd534441f32e778fe2d32acf5c89b65fd7c32a99 /src/gr
parent388986b9703d24edf3a9b9714bcf16cf0408635e (diff)
add explicit reporting of offending point (x,y,z) and end/axis
if a surface point is outside the grid git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@553 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/gr')
-rw-r--r--src/gr/horizon_function.cc41
1 files changed, 37 insertions, 4 deletions
diff --git a/src/gr/horizon_function.cc b/src/gr/horizon_function.cc
index 42e8f1d..68d2a94 100644
--- a/src/gr/horizon_function.cc
+++ b/src/gr/horizon_function.cc
@@ -391,13 +391,46 @@ status = CCTK_InterpLocalUniform(N_GRID_DIMS,
output_arrays);
if (status == CCTK_ERROR_INTERP_POINT_X_RANGE)
then {
- // FIXME: should look at interpolator output table entries
- // and report *which* point is out-of-range
- error_exit(ERROR_EXIT,
+ // look in interpolator output table entries
+ // to see *which* point is out-of-range
+ CCTK_INT out_of_range_pt, out_of_range_axis, out_of_range_end;
+ if ( (Util_TableGetInt(gii.param_table_handle,
+ &out_of_range_pt,
+ "out_of_range_pt") < 0)
+ || (Util_TableGetInt(gii.param_table_handle,
+ &out_of_range_axis,
+ "out_of_range_axis") < 0)
+ || (Util_TableGetInt(gii.param_table_handle,
+ &out_of_range_end,
+ "out_of_range_end") < 0) )
+ then error_exit(ERROR_EXIT,
"***** interpolate_geometry():\n"
" point out of range when interpolating geometry info from 3-D grid!\n"
" ==> the trial horizon surface is (at least partially)\n"
-" outside the grid and/or in an excised region\n"); /*NOTREACHED*/
+" outside the grid and/or in an excised region!\n"
+" (unable to get info about which point is out of range:\n"
+" maybe an interpolator problem?)\n"); /*NOTREACHED*/
+
+ assert(out_of_range_pt >= 0);
+ assert(out_of_range_pt < ps.N_grid_points());
+ const double x = ps.gridfn_data(nominal_gfns::gfn__xx)[out_of_range_pt];
+ const double y = ps.gridfn_data(nominal_gfns::gfn__yy)[out_of_range_pt];
+ const double z = ps.gridfn_data(nominal_gfns::gfn__zz)[out_of_range_pt];
+
+ assert(out_of_range_axis >= 0);
+ assert(out_of_range_axis < N_GRID_DIMS);
+ const char axis = "xyz"[out_of_range_axis];
+
+ assert((out_of_range_end == -1) || (out_of_range_end == +1));
+ const char end = (out_of_range_end == -1) ? '-' : '+';
+
+ error_exit(ERROR_EXIT,
+"***** interpolate_geometry():\n"
+" the point (%g,%g,%g) on the trial horizon surface\n"
+" is outside the grid in the %c%c direction!\n"
+,
+ x, y, z,
+ end, axis); /*NOTREACHED*/
}
if (status < 0)
then error_exit(ERROR_EXIT,