aboutsummaryrefslogtreecommitdiff
path: root/src/patch
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2003-03-20 14:06:15 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2003-03-20 14:06:15 +0000
commitfcb51f4fb86f866db003d9d13b3dadd1d411dfbf (patch)
treef49888f7afd0529f2bbc0bca6b6105353f67dfc3 /src/patch
parent769e462a91248bf57a6310c093337243b7bd080b (diff)
fix the misfeature where the excision mask wasn't set in the symmetry zones
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@1000 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/patch')
-rw-r--r--src/patch/patch_system.cc40
-rw-r--r--src/patch/patch_system.hh3
2 files changed, 40 insertions, 3 deletions
diff --git a/src/patch/patch_system.cc b/src/patch/patch_system.cc
index cea3544..48a5049 100644
--- a/src/patch/patch_system.cc
+++ b/src/patch/patch_system.cc
@@ -1726,8 +1726,9 @@ else error_exit(ERROR_EXIT,
//
// This function computes the radius of a patch-system 2-surface in the
-// direction of a specified (x,y,z) point. (If the point coincides with
-// the local origin, we return the dummy value 1.0.)
+// direction of a specified local (x,y,z) point, taking into account any
+// patch-system symmetries. If the point coincides with the local origin,
+// we return the dummy value 1.0.
//
// Bugs:
// Due to the surface-interpolator overhead, repeatedly calling this
@@ -1740,11 +1741,46 @@ fp patch_system::radius_in_local_xyz_direction(int ghosted_radius_gfn,
if ((x == 0.0) && (y == 0.0) && (z == 0.0))
then return 1.0;
+//
+// apply symmetries to map (x,y,z) into that part of the 2-sphere
+// which is covered by the patch system
+//
+switch (type())
+ {
+case patch_system__full_sphere:
+ break;
+case patch_system__plus_z_hemisphere:
+ z = fabs(z);
+ break;
+case patch_system__plus_xy_quadrant_mirrored:
+case patch_system__plus_xy_quadrant_rotating:
+ x = fabs(x);
+ y = fabs(y);
+ break;
+case patch_system__plus_xz_quadrant_rotating:
+ x = fabs(x);
+ z = fabs(z);
+ break;
+case patch_system__plus_xyz_octant_mirrored:
+case patch_system__plus_xyz_octant_rotating:
+ x = fabs(x);
+ y = fabs(y);
+ z = fabs(z);
+ break;
+default:
+ error_exit(PANIC_EXIT,
+"***** patch_system::radius_in_local_xyz_direction():\n"
+" unknown patch system type()=(int)%d!\n"
+" (this should never happen!)\n",
+ int(type())); /*NOTREACHED*/
+ }
+
const patch* p_ptr = patch_containing_local_xyz(x, y, z);
if (p_ptr == NULL)
then error_exit(ERROR_EXIT,
"***** patch_system::radius_in_local_xyz_direction():\n"
" can't find containing patch!\n"
+" (this should never happen!)\n",
" [local] (x,y,z)=(%g,%g,%g)\n"
,
double(x), double(y), double(z));
diff --git a/src/patch/patch_system.hh b/src/patch/patch_system.hh
index 942f0fc..03dd02d 100644
--- a/src/patch/patch_system.hh
+++ b/src/patch/patch_system.hh
@@ -288,7 +288,8 @@ public:
const patch* patch_containing_local_xyz(fp x, fp y, fp z)
const;
- // radius of surface in direction of an (x,y,z) point
+ // radius of surface in direction of an (x,y,z) point,
+ // taking into account any patch-system symmetries;
// or dummy value 1.0 if point is identical to local origin
//
// FIXME: