diff options
author | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2002-04-11 16:07:59 +0000 |
---|---|---|
committer | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2002-04-11 16:07:59 +0000 |
commit | 553f43a6f2c14cd6edebb21edeeed8fc69962372 (patch) | |
tree | ff75e144bee2074b832eb0503956079025ecb46f /src/patch/test_patch_system.cc | |
parent | 8c30c7744e60de9eb8c99636c743e2db7d037ccc (diff) |
output named gridfns directly -- get rid of params to specify file names
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@492 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/patch/test_patch_system.cc')
-rw-r--r-- | src/patch/test_patch_system.cc | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/src/patch/test_patch_system.cc b/src/patch/test_patch_system.cc index 5a325a0..d064f0e 100644 --- a/src/patch/test_patch_system.cc +++ b/src/patch/test_patch_system.cc @@ -164,52 +164,40 @@ CCTK_VInfo(CCTK_THORNSTRING, "patch system created ok"); // // do the actual tests // -FILE *output_file_ptr = fopen(output_file_name, "w"); -if (output_file_ptr == NULL) - then CCTK_VWarn(-1, __LINE__, __FILE__, CCTK_THORNSTRING, - "can't open output file \"%s\"!", - output_file_name); /*NOTREACHED*/ if (STRING_EQUAL(which_test, "gridfn")) then { setup_sym_fn_xyz(ps, test_fn_gfn, true); - ps.print_ghosted_gridfn(test_fn_gfn, true, output_file_ptr); + ps.print_ghosted_gridfn(test_fn_gfn, "test_fn"); } else if (STRING_EQUAL(which_test, "synchronize")) then { setup_sym_fn_xyz(ps, test_fn_gfn, false); + ps.print_ghosted_gridfn(test_fn_gfn, "test_fn_init.dat"); 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.print_ghosted_gridfn(test_fn_gfn, "test_fn_sync.dat"); ghosted_gridfn_minus(ps, test_fn_gfn, test_fn_copy_gfn, ghosted_error_gfn); - ps.print_ghosted_gridfn(ghosted_error_gfn, true, output_file_ptr); + ps.print_ghosted_gridfn(ghosted_error_gfn, "ghosted_error.dat"); } else if (STRING_EQUAL(which_test, "derivatives")) then { setup_fn_rho_sigma(ps, test_fn_gfn); + ps.print_gridfn(nominal_error_gfn, "test_fn.dat" finite_diff(ps, test_fn_gfn, FD_derivs_gfn, which_derivs); + ps.print_gridfn(FD_derivs_gfn, "FD_derivs.dat" analytic_derivs(ps, analytic_derivs_gfn, which_derivs); + ps.print_gridfn(analytic_derivs_gfn, "analytic_derivs.dat" gridfn_minus(ps, FD_derivs_gfn, analytic_derivs_gfn, nominal_error_gfn); - ps.print_gridfn(nominal_error_gfn, output_file_ptr); + ps.print_gridfn(nominal_error_gfn, "nominal_error.dat"); } else CCTK_VWarn(-1, __LINE__, __FILE__, CCTK_THORNSTRING, "unknown which_test=\"%s\"!", 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"); } |