aboutsummaryrefslogtreecommitdiff
path: root/src/patch/test_patch_system.cc
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-07-16 10:54:58 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-07-16 10:54:58 +0000
commit18bfc9c3a99f30f9b10c185d4a940525274732d7 (patch)
tree7f1ea0552f10cb40629b899f072707b0d796bc69 /src/patch/test_patch_system.cc
parent2ae626ede958b2ded392e3ac4015df65af8cea9d (diff)
add a bunch more support code for Jacobians,
also rename patch_system::synchronize_ghost_zones() --> synchronize() git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@628 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/patch/test_patch_system.cc')
-rw-r--r--src/patch/test_patch_system.cc21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/patch/test_patch_system.cc b/src/patch/test_patch_system.cc
index 5866a9d..27fe933 100644
--- a/src/patch/test_patch_system.cc
+++ b/src/patch/test_patch_system.cc
@@ -130,7 +130,7 @@ fp finite_diff_fn(const patch& p,
int ghosted_gfn_src, int which_derivs,
int irho, int isigma);
fp analytic_deriv_fn(fp rho, fp sigma, int which_derivs);
- };
+ }
//******************************************************************************
//******************************************************************************
@@ -199,7 +199,7 @@ else if (STRING_EQUAL(which_test, "synchronize"))
setup_sym_fn_xyz(ps, test_fn_copy_gfn, true);
ps.print_ghosted_gridfn(test_fn_copy_gfn, "test_fn_copy.dat");
- ps.synchronize_ghost_zones(test_fn_gfn, test_fn_gfn);
+ ps.synchronize(test_fn_gfn, test_fn_gfn);
ps.print_ghosted_gridfn(test_fn_gfn, "test_fn_sync.dat");
ghosted_gridfn_minus(ps,
@@ -246,8 +246,7 @@ CCTK_VInfo(CCTK_THORNSTRING, "destroying patch system");
//
// This function tests the computation of the Jacobian of the
-// patch_system::synchronize_ghost_zones() operation. In outline, it
-// does the following:
+// patch_system::synchronize() operation. In outline, it does the following:
//
// set up a test function in test_gfn on the nominal grid
// synchronize test_gfn
@@ -311,7 +310,7 @@ void test_synchronize_Jacobians(patch_system& ps,
CCTK_VInfo(CCTK_THORNSTRING, "testing synchronize() Jacobian...");
setup_sym_fn_xyz(ps, test_gfn, false);
-ps.synchronize_ghost_zones(test_fn_gfn, test_fn_gfn);
+ps.synchronize(test_fn_gfn, test_fn_gfn);
ps.print_ghosted_gridfn(test_fn_gfn, "test_fn.dat");
setup_sym_fn_xyz(ps, NP_test_gfn, false);
@@ -404,7 +403,7 @@ fprintf(fileptr, "# column 17 = Jacobian error\n");
yp.ghosted_gridfn(NP_test_gfn, y_irho,y_isigma)
+= perturbation_amplitude;
- ps.synchronize_ghost_zones(NP_test_gfn, NP_test_gfn);
+ ps.synchronize(NP_test_gfn, NP_test_gfn);
const fp NP_Jacobian
= ( xp.ghosted_gridfn(NP_test_gfn, x_irho,x_isigma)
- xp.ghosted_gridfn( test_gfn, x_irho,x_isigma) )
@@ -858,7 +857,7 @@ default:
int(type)); /*NOTREACHED*/
}
}
- };
+ }
//******************************************************************************
@@ -871,7 +870,7 @@ fp fn_xyz(fp x, fp y, fp z)
return (x*(x+0.238) + 2.417*y*(y-0.917) + 1.38*z*(z-0.472))
* tanh(jtutil::pow3(cos(z)));
}
- };
+ }
//******************************************************************************
//******************************************************************************
@@ -886,7 +885,7 @@ fp fn_rho_sigma(fp rho, fp sigma)
{
return exp(sin(1.38*rho)) * tanh(0.17+0.83*jtutil::pow2(sin(sigma)));
}
- };
+ }
//******************************************************************************
@@ -927,7 +926,7 @@ if (which_derivs & which_deriv_sigma_sigma)
return sum;
}
- };
+ }
//******************************************************************************
@@ -989,4 +988,4 @@ if (which_derivs & which_deriv_sigma_sigma)
return sum;
}
- };
+ }