aboutsummaryrefslogtreecommitdiff
path: root/src/template.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/template.c')
-rw-r--r--src/template.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/template.c b/src/template.c
index 6cce81c..6c46e4e 100644
--- a/src/template.c
+++ b/src/template.c
@@ -977,6 +977,61 @@ fflush(stdout);
then {
++error_info->error_count;
+ if (error_info->print_warning_msg)
+ then {
+ fp grid_min_xyz[MAX_N_DIMS], grid_max_xyz[MAX_N_DIMS];
+ for (axis = 0 ; axis < N_DIMS ; ++axis)
+ {
+ grid_min_xyz[axis]
+ = coord_origin[axis]
+ + input_array_min_subscripts[axis]*coord_delta[axis];
+ grid_max_xyz[axis]
+ = coord_origin[axis]
+ + input_array_max_subscripts[axis]*coord_delta[axis];
+ }
+ CCTK_VWarn(WARNING_MSG_SEVERITY_LEVEL,
+ __LINE__, __FILE__, CCTK_THORNSTRING,
+"\n"
+" CCTK_InterpLocalUniform():\n"
+" interpolation point is either outside the grid,\n"
+" or inside but too close to the grid boundary!\n"
+" 0-origin interpolation point number pt=%d\n"
+" 0-origin coordinate axis=%d\n"
+#if (N_DIMS == 1)
+" interpolation point x=%g\n"
+" grid [x_min,x_max] = [%g,%g]\n"
+#elif (N_DIMS == 2)
+" interpolation point (x,y)=(%g,%g)\n"
+" grid [x_min,x_max] = [%g,%g]\n"
+" grid [y_min,y_max] = [%g,%g]\n"
+#elif (N_DIMS == 3)
+" interpolation point (x,y,z)=(%g,%g,%g)\n"
+" grid [x_min,x_max] = [%g,%g]\n"
+" grid [y_min,y_max] = [%g,%g]\n"
+" grid [z_min,z_max] = [%g,%g]\n"
+#else
+ #error "N_DIMS may not be > 3!"
+#endif
+ ,
+ pt, axis,
+ #if (N_DIMS == 1)
+ (double) interp_coords_fp[X_AXIS],
+ (double) grid_min_xyz[X_AXIS], (double) grid_max_xyz[X_AXIS]);
+ #elif (N_DIMS == 2)
+ (double) interp_coords_fp[X_AXIS], (double) interp_coords_fp[Y_AXIS],
+ (double) grid_min_xyz[X_AXIS], (double) grid_max_xyz[X_AXIS],
+ (double) grid_min_xyz[Y_AXIS], (double) grid_max_xyz[Y_AXIS]);
+ #elif (N_DIMS == 3)
+ (double) interp_coords_fp[X_AXIS], (double) interp_coords_fp[Y_AXIS],
+ (double) interp_coords_fp[Z_AXIS],
+ (double) grid_min_xyz[X_AXIS], (double) grid_max_xyz[X_AXIS],
+ (double) grid_min_xyz[Y_AXIS], (double) grid_max_xyz[Y_AXIS],
+ (double) grid_min_xyz[Z_AXIS], (double) grid_max_xyz[Z_AXIS]);
+ #else
+ #error "N_DIMS may not be > 3!"
+ #endif
+ }
+
if (this_point_status < return_status)
then return_status = this_point_status;