diff options
author | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2003-05-13 14:45:06 +0000 |
---|---|---|
committer | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2003-05-13 14:45:06 +0000 |
commit | 6d4db36bf583dba44806b8662f17e9ab20938e3a (patch) | |
tree | 086ed5153df677f06f6c6dcbb9a093533680addc /src/gr | |
parent | 56c143d35416ed3ff9cb0d7d3e0f379483499479 (diff) |
if we get a CCTK_ERROR_INTERP_POINT_OUTSIDE error code (point outside grid),
then make sure the local interpolator also returned this error code
before we use its error status
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@1057 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/gr')
-rw-r--r-- | src/gr/expansion.cc | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/src/gr/expansion.cc b/src/gr/expansion.cc index 5030c0b..c030942 100644 --- a/src/gr/expansion.cc +++ b/src/gr/expansion.cc @@ -643,13 +643,21 @@ if (status == CCTK_ERROR_INTERP_POINT_OUTSIDE) then { if (print_msg_flag) then { + // did the local interpolator report an error on this processor? const int warn_level = initial_flag ? error_info.warn_level__point_outside__initial : error_info.warn_level__point_outside__subsequent; + // look in interpolator output table entries - // to see *which* point is out-of-range + // to see if the local interpolator reported an error on this + // processor, and if so, *which* point is out-of-range + CCTK_INT local_interpolator_status; CCTK_INT error_pt, error_axis, error_direction; + const int status_interp + = Util_TableGetInt(gi.param_table_handle, + &local_interpolator_status, + "local_interpolator_status"); const int status_pt = Util_TableGetInt(gi.param_table_handle, &error_pt, "error_pt"); @@ -659,9 +667,9 @@ if (status == CCTK_ERROR_INTERP_POINT_OUTSIDE) const int status_direction = Util_TableGetInt(gi.param_table_handle, &error_direction, "error_direction"); - if ( (status_pt > 0) - && (status_axis > 0) - && (status_direction > 0) ) + if ( (status_interp > 0) && (status_pt > 0) + && (status_axis > 0) + && (status_direction > 0) ) then { assert(error_pt >= 0); assert(error_pt < ps_ptr->N_grid_points()); @@ -689,8 +697,8 @@ if (status == CCTK_ERROR_INTERP_POINT_OUTSIDE) " global_(x,y,z)=(%g,%g,%g)\n" " is outside the grid (or too close to the boundary)" " in the %c%c direction!\n" -" ... in a single-processor run, this may also mean that\n" -" driver::ghost_size is too small for this geometry interpolator\n" +" (in a single-processor run, this may also mean that\n" +" driver::ghost_size is too small for this geometry interpolator)\n" , error_pt, global_x, global_y, global_z, @@ -701,17 +709,20 @@ if (status == CCTK_ERROR_INTERP_POINT_OUTSIDE) "\n" "interpolate_geometry():\n" " one or more points on the trial horizon surface point" -" is outside the grid (or too close to the boundary)" -" ... in a single-processor run, this may also mean that\n" -" driver::ghost_size is too small for this geometry interpolator\n"); +" is/are outside the grid (or too close to the boundary)" +" (in a single-processor run, this may also mean that\n" +" driver::ghost_size is too small for this geometry interpolator)\n"); } + return expansion_failure__surface_outside_grid; // *** ERROR RETURN *** } + else if (status == CCTK_ERROR_INTERP_GHOST_SIZE_TOO_SMALL) then error_exit(ERROR_EXIT, "***** interpolate_geometry(): driver::ghost_size is too small\n" " for this geometry interpolator!\n"); /*NOTREACHED*/ + else if (status < 0) then error_exit(ERROR_EXIT, "***** interpolate_geometry(): error return %d from interpolator!\n", |