aboutsummaryrefslogtreecommitdiff
path: root/src/gr
diff options
context:
space:
mode:
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,