aboutsummaryrefslogtreecommitdiff
path: root/src/patch/test_patch_system.cc
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2001-09-14 16:19:25 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2001-09-14 16:19:25 +0000
commit1ad5b10ee6480c69659c71d2a4896e1f52645bbb (patch)
tree47a52d2e5b718f43f095ae74431e9392ebe456fd /src/patch/test_patch_system.cc
parente168094c1e122b88543a91ac90e7f71b6121df89 (diff)
fix some more bugs in how we symmetrize the test fn(x,y,z)
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@329 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/patch/test_patch_system.cc')
-rw-r--r--src/patch/test_patch_system.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/patch/test_patch_system.cc b/src/patch/test_patch_system.cc
index b75acac..a1d3293 100644
--- a/src/patch/test_patch_system.cc
+++ b/src/patch/test_patch_system.cc
@@ -337,12 +337,8 @@ printf("## setting up test fn(x,y,z) on %s grid...\n",
p.xyz_of_r_rho_sigma(1.0, rho, sigma,
local_x, local_y, local_z);
- const fp global_x = ps.global_x_of_local_x(local_x);
- const fp global_y = ps.global_y_of_local_y(local_y);
- const fp global_z = ps.global_z_of_local_z(local_z);
-
p.gridfn(gfn, irho,isigma)
- = sym_fn_xyz(ps.type(), global_x, global_y, global_z);
+ = sym_fn_xyz(ps.type(), local_x, local_y, local_z);
}
}
}
@@ -498,8 +494,8 @@ void gridfn_minus(patch_system& ps,
//******************************************************************************
//
-// This function symmetrizes fn_xyz() to match the patch system's
-// symmetries.
+// This function symmetrizes fn_xyz() (about the origin) to match
+// the patch system's symmetries.
//
// To rotate f(x,y) by 90, 180, or 270 degrees:
//
@@ -560,7 +556,8 @@ default:
namespace {
fp fn_xyz(fp x, fp y, fp z)
{
-return (x*x + 2.417*y*y + 1.38*z*z) * tanh(jtutil::pow3(cos(z)));
+return (x*(x+0.238) + 2.417*y*(y-0.917) + 1.38*z*(z-0.472))
+ * tanh(jtutil::pow3(cos(z)));
}
};