aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-04-11 11:18:24 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-04-11 11:18:24 +0000
commit280a8cd68957fbf20d38f8515f43b42680efd146 (patch)
tree36b6b5444f00352c83021fc882b05fb3f416d69e
parent3e0245a63506360e2eabdd2b15de10371a53661f (diff)
add facility to print a 2nd gridfn
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@489 f88db872-0e4f-0410-b76b-b9085cfa78c5
-rw-r--r--param.ccl10
-rw-r--r--src/patch/test_patch_system.cc13
2 files changed, 23 insertions, 0 deletions
diff --git a/param.ccl b/param.ccl
index 43eb806..bd0f85d 100644
--- a/param.ccl
+++ b/param.ccl
@@ -88,3 +88,13 @@ string output_file_name "name of output file (gnuplot format)"
{
.* :: "any string that's a valid Unix file name"
} "test.dat"
+
+int which_gfn2_to_output "gfn2 to output"
+{
+*:* :: "any valid gfn"
+} 0
+
+string output2_file_name "name of output2 file (gnuplot format)"
+{
+.* :: "any string that's a valid Unix file name"
+} "test2.dat"
diff --git a/src/patch/test_patch_system.cc b/src/patch/test_patch_system.cc
index 3a9ee4c..5a325a0 100644
--- a/src/patch/test_patch_system.cc
+++ b/src/patch/test_patch_system.cc
@@ -73,6 +73,7 @@ static const fp deriv_weight_fn = 3.14,
deriv_weight_rho_sigma = 9.79,
deriv_weight_sigma_sigma = 3.23;
+// n.b. nominal gfns must all be < 0, ghosted > 0
// nominal gridfns
static const int FD_derivs_gfn = -1;
static const int analytic_derivs_gfn = -2;
@@ -198,6 +199,18 @@ else CCTK_VWarn(-1, __LINE__, __FILE__, CCTK_THORNSTRING,
which_test); /*NOTREACHED*/
fclose(output_file_ptr);
+// output gridfn #2?
+FILE *output2_file_ptr = fopen(output2_file_name, "w");
+if (output2_file_ptr == NULL)
+ then CCTK_VWarn(-1, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "can't open output #2 file \"%s\"!",
+ output2_file_name); /*NOTREACHED*/
+if (which_gfn2_to_output < 0)
+ then ps.print_gridfn(which_gfn2_to_output, output2_file_ptr);
+if (which_gfn2_to_output > 0)
+ then ps.print_ghosted_gridfn(which_gfn2_to_output, true, output2_file_ptr);
+fclose(output2_file_ptr);
+
CCTK_VInfo(CCTK_THORNSTRING, "destroying patch system");
}