aboutsummaryrefslogtreecommitdiff
path: root/src/patch/test_patch_system.cc
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-04-09 17:12:23 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-04-09 17:12:23 +0000
commit56eea18f4cbbe2a8f801679edb107e841623735e (patch)
tree1346c8cf2ea58a08fa7958eb1364b79e3789095b /src/patch/test_patch_system.cc
parent29a8de2b1d59cceec031d5299575ae606f4c2e25 (diff)
fix a bug in taking derivatives (used nominal instead of ghosted gridfns)
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@471 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/patch/test_patch_system.cc')
-rw-r--r--src/patch/test_patch_system.cc41
1 files changed, 17 insertions, 24 deletions
diff --git a/src/patch/test_patch_system.cc b/src/patch/test_patch_system.cc
index 62a35cd..82df69e 100644
--- a/src/patch/test_patch_system.cc
+++ b/src/patch/test_patch_system.cc
@@ -4,7 +4,6 @@
//
// <<<misc global data>>>
// <<<prototypes>>>
-// <<<gfn definitions>>>
//
// driver - Cactus interface
//
@@ -74,6 +73,20 @@ static const fp deriv_weight_fn = 3.14,
deriv_weight_rho_sigma = 9.79,
deriv_weight_sigma_sigma = 3.23;
+// nominal gridfns
+static const int FD_derivs_gfn = -1;
+static const int analytic_derivs_gfn = -2;
+static const int nominal_error_gfn = -3;
+static const int nominal_min_gfn = -3;
+static const int nominal_max_gfn = -1;
+
+// ghosted gridfns
+static const int test_fn_gfn = 1;
+static const int test_fn_copy_gfn = 2;
+static const int ghosted_error_gfn = 3;
+static const int ghosted_min_gfn = 1;
+static const int ghosted_max_gfn = 3;
+
//******************************************************************************
//
@@ -107,26 +120,6 @@ fp analytic_deriv_fn(fp rho, fp sigma, int which_derivs);
};
//******************************************************************************
-
-//
-// ***** gfn definitions *****
-//
-
-// nominal gridfns
-static const int FD_derivs_gfn = -1;
-static const int analytic_derivs_gfn = -2;
-static const int nominal_error_gfn = -3;
-static const int nominal_min_gfn = -3;
-static const int nominal_max_gfn = -1;
-
-// ghosted gridfns
-static const int test_fn_gfn = 1;
-static const int test_fn_copy_gfn = 2;
-static const int ghosted_error_gfn = 3;
-static const int ghosted_min_gfn = 1;
-static const int ghosted_max_gfn = 3;
-
-//******************************************************************************
//******************************************************************************
//******************************************************************************
@@ -383,7 +376,7 @@ void gridfn_minus(patch_system& ps,
int gfn_x, int gfn_y, int gfn_dst)
{
CCTK_VInfo(CCTK_THORNSTRING,
- "[nominal] gfn=%d - gfn=%d --> gfn=%d\n",
+ "[nominal] gfn=%d - gfn=%d --> gfn=%d",
gfn_x, gfn_y, gfn_dst);
for (int pn = 0 ; pn < ps.N_patches() ; ++pn)
@@ -415,7 +408,7 @@ void ghosted_gridfn_minus(patch_system& ps,
int ghosted_gfn_dst)
{
CCTK_VInfo(CCTK_THORNSTRING,
- "[ghosted] gfn=%d - gfn=%d --> gfn=%d\n",
+ "[ghosted] gfn=%d - gfn=%d --> gfn=%d",
ghosted_gfn_x, ghosted_gfn_y, ghosted_gfn_dst);
for (int pn = 0 ; pn < ps.N_patches() ; ++pn)
@@ -545,7 +538,7 @@ fp sum = 0.0;
if (which_derivs & which_deriv_fn)
then sum += deriv_weight_fn
- * p.gridfn(ghosted_gfn_src, irho,isigma);
+ * p.ghosted_gridfn(ghosted_gfn_src, irho,isigma);
if (which_derivs & which_deriv_rho)
then sum += deriv_weight_rho