aboutsummaryrefslogtreecommitdiff
path: root/src/patch/ghost_zone.cc
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2001-07-15 13:02:14 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2001-07-15 13:02:14 +0000
commitcbe7d467fb0b8e2b50ae8ff0947e319b72416ac6 (patch)
tree30f112e4056aec9ca1ae3536f72b1b42d2ebdd65 /src/patch/ghost_zone.cc
parent8f97a0dac7c1e30ec21746c8d139d05f4dee4fd8 (diff)
add more sanity/consistency checks to interpatch_ghost_zone:: ctor
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@153 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/patch/ghost_zone.cc')
-rw-r--r--src/patch/ghost_zone.cc19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/patch/ghost_zone.cc b/src/patch/ghost_zone.cc
index f692adc..f518b1d 100644
--- a/src/patch/ghost_zone.cc
+++ b/src/patch/ghost_zone.cc
@@ -187,8 +187,8 @@ if (border_is_min() == other_edge().is_min())
my_patch().name(), my_edge().name(),
other_patch().name(), other_edge().name()); /*NOTREACHED*/
-// coord in common between the two patches == perp coord in both patches
-// and this patch's tau coordinate == other edge's parallel coordinate
+// coord in common between the two patches must be perp coord in both patches
+// and this patch's tau coordinate must be other edge's parallel coordinate
local_coords::coords_set my_coords_set
= my_patch().coords_set_rho() | my_patch().coords_set_sigma();
local_coords::coords_set other_coords_set
@@ -223,6 +223,21 @@ if (! ( (common_coords_set == my_edge().coords_setperp())
local_coords::name_of_coords_set(other_edge().coords_set_par()));
/*NOTREACHED*/
+// perp coordinate must match across the two patches
+if (fuzzy_NE(my_edge.grid_outer_perp(), other_edge().grid_outer_perp()))
+ then error_exit(ERROR_EXIT,
+"***** interpatch_ghost_zone::interpatch_ghost_zone:\n"
+" my_patch().name()=\"%s\" my_edge().name()=%s\n"
+" other_patch().name()=\"%s\" other_edge().name()=%s\n"
+" perp coordinate doesn't match across the two patches!\n"
+" my_edge.grid_outer_perp()=%g\n"
+" other_edge.grid_outer_perp()=%g\n"
+,
+ my_patch().name(), my_edge().name(),
+ other_patch().name(), other_edge().name(),
+ double(my_edge.grid_outer_perp()),
+ double(other_edge.grid_outer_perp())); /*NOTREACHED*/
+
//
// how long will this border be?