aboutsummaryrefslogtreecommitdiff
path: root/src/patch/ghost_zone.cc
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2001-09-07 13:17:10 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2001-09-07 13:17:10 +0000
commit723db299e5b01586da799f3790bfce467fdddbc3 (patch)
tree928ff4c649e5ac0db96a162d2de40e0b407b7479 /src/patch/ghost_zone.cc
parenta7434ea8854d5334b72e38ce82465fad408ed17c (diff)
fix last remaining uses of cpm_map<fp>::{plus,minus}_map
to use the new map_is_plus bool flag instead git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@292 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/patch/ghost_zone.cc')
-rw-r--r--src/patch/ghost_zone.cc51
1 files changed, 18 insertions, 33 deletions
diff --git a/src/patch/ghost_zone.cc b/src/patch/ghost_zone.cc
index 0e780c4..60389f3 100644
--- a/src/patch/ghost_zone.cc
+++ b/src/patch/ghost_zone.cc
@@ -64,7 +64,7 @@ ipar_map_ = new cpm_map<fp>(my_edge_in.min_ipar_with_corners(),
symmetry_ghost_zone::symmetry_ghost_zone
(const patch_edge& my_edge_in, const patch_edge& symmetry_edge_in,
int my_edge_sample_ipar, int symmetry_edge_sample_ipar,
- bool ipar_map_sign)
+ bool ipar_map_is_plus)
: ghost_zone(my_edge_in, ghost_zone_is_symmetry),
symmetry_patch_(symmetry_edge_in.my_patch()),
symmetry_edge_(symmetry_edge_in)
@@ -75,39 +75,24 @@ symmetry_ghost_zone::symmetry_ghost_zone
const fp fp_my_period_plane_iperp = my_edge().fp_grid_outer_iperp();
const fp fp_symmetry_period_plane_iperp = symmetry_edge().fp_grid_outer_iperp();
-const fp fp_iperp_shift_amount
- = fp_symmetry_period_plane_iperp - fp_my_period_plane_iperp;
-if (! fuzzy<fp>::is_integer(fp_iperp_shift_amount))
- then error_exit(ERROR_EXIT,
-"***** symmetry_ghost_zone::symmetry_ghost_zone (periodic symmetry):\n"
-" fp_symmetry_period_plane_iperp=%g - fp_my_period_plane_iperp=%g\n"
-" isn't fuzzily integral!\n"
-" ==> periodic-symmetry periodicity is incommensurate with grid!\n"
-,
- double(fp_symmetry_period_plane_iperp),
- double(fp_my_period_plane_iperp)); /*NOTREACHED*/
-const int iperp_shift_amount = round<fp>::to_integer(fp_iperp_shift_amount);
-
// iperp mapping must be outside --> inside
// i.e. if both edges have iperp as the same min/max "direction",
-// then the mapping is iperp increasing --> iperp decreasing
-const bool iperp_map_sign = (my_edge().is_min() == symmetry_edge().is_min())
- ? cpm_map<fp>::minus_map
- : cpm_map<fp>::plus_map;
-iperp_map_ = new
- cpm_map<fp>
- (min_iperp(), max_iperp(),
- fp_my_period_plane_iperp, fp_symmetry_period_plane_iperp,
- iperp_map_sign);
+// then the mapping is iperp increasing --> iperp decreasing
+// (i.e. the map's sign is -1)
+const bool iperp_map_is_plus
+ = ! (my_edge().is_min() == symmetry_edge().is_min());
+iperp_map_ = new cpm_map<fp>(min_iperp(), max_iperp(),
+ fp_my_period_plane_iperp,
+ fp_symmetry_period_plane_iperp,
+ iperp_map_is_plus);
//
// parallel map
//
-ipar_map_ = new cpm_map<fp>
- (my_edge().min_ipar_with_corners(),
- my_edge().max_ipar_with_corners(),
- my_edge_sample_ipar, symmetry_edge_sample_ipar,
- ipar_map_sign);
+ipar_map_ = new cpm_map<fp>(my_edge().min_ipar_with_corners(),
+ my_edge().max_ipar_with_corners(),
+ my_edge_sample_ipar, symmetry_edge_sample_ipar,
+ ipar_map_is_plus);
}
//******************************************************************************
@@ -308,13 +293,13 @@ const int other_sample_iperp = round<fp>::to_integer(fp_other_sample_iperp);
const double iperp_map_sign_pm1
= jtutil::signum(my_edge().perp_map().delta_fp())
* jtutil::signum(other_edge().perp_map().delta_fp());
+// ... here as standard bool
+const bool iperp_map_is_plus = (iperp_map_sign_pm1 > 0.0);
// now we finally know enough to set up the iperp interpatch coordinate mapping
-other_iperp_ = new cpm_map<fp>
- (min_iperp(), max_iperp(),
- sample_iperp, other_sample_iperp,
- (iperp_map_sign_pm1 > 0.0) ? cpm_map<fp>::plus_map
- : cpm_map<fp>::minus_map);
+other_iperp_ = new cpm_map<fp>(min_iperp(), max_iperp(),
+ sample_iperp, other_sample_iperp,
+ iperp_map_is_plus);
//
// set up the par interpatch coordinate mapping