aboutsummaryrefslogtreecommitdiff
path: root/src/patch/test_patch_system.cc
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2001-09-12 16:03:44 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2001-09-12 16:03:44 +0000
commitdd1b26349f1507ef961565c9b94efe695c8d5313 (patch)
tree802b814ff4de3105037160cef8bfcb2c057dddcd /src/patch/test_patch_system.cc
parent197e6b4cfb278ce51fd3271493f26728e6d5904e (diff)
fix gridfn_minus() to do ghost zones if requested
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@318 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/patch/test_patch_system.cc')
-rw-r--r--src/patch/test_patch_system.cc25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/patch/test_patch_system.cc b/src/patch/test_patch_system.cc
index 08818ce..b3715ea 100644
--- a/src/patch/test_patch_system.cc
+++ b/src/patch/test_patch_system.cc
@@ -80,7 +80,7 @@ void setup_fn_rho_sigma(patch_system& ps, int gfn, bool want_ghost_zones);
void finite_diff(patch_system& ps, int gfn_src, int gfn_dst, int which_derivs);
void analytic_derivs(patch_system& ps, int gfn_dst, int which_derivs);
void gridfn_minus(patch_system& ps,
- int gfn_x, int gfn_y, int gfn_z,
+ int gfn_x, int gfn_y, int gfn_dst,
bool want_ghost_zones);
fp fn_xyz(fp global_x, fp global_y, fp global_z);
@@ -454,21 +454,26 @@ printf("## computing analytic derivatives...\n");
//
namespace {
void gridfn_minus(patch_system& ps,
- int gfn_x, int gfn_y, int gfn_z,
+ int gfn_x, int gfn_y, int gfn_dst,
bool want_ghost_zones)
{
for (int pn = 0 ; pn < ps.N_patches() ; ++pn)
{
patch& p = ps.ith_patch(pn);
- for (int irho = p.min_irho() ; irho <= p.max_irho() ; ++irho)
- {
- for (int isigma = p.min_isigma() ; isigma <= p.max_isigma() ; ++isigma)
- {
- p.gridfn(gfn_z, irho,isigma)
- = p.gridfn(gfn_x, irho,isigma) - p.gridfn(gfn_y, irho,isigma);
- }
- }
+ for (int irho = p.effective_min_irho(want_ghost_zones) ;
+ irho <= p.effective_max_irho(want_ghost_zones) ;
+ ++irho)
+ {
+ for (int isigma = p.effective_min_isigma(want_ghost_zones) ;
+ isigma <= p.effective_max_isigma(want_ghost_zones) ;
+ ++isigma)
+ {
+ p.gridfn(gfn_dst, irho,isigma)
+ = p.gridfn(gfn_x, irho,isigma)
+ - p.gridfn(gfn_y, irho,isigma);
+ }
+ }
}
}