aboutsummaryrefslogtreecommitdiff
path: root/src/patch/ghost_zone.cc
diff options
context:
space:
mode:
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?