aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-04-17 15:23:57 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-04-17 15:23:57 +0000
commitde93f69f6d2b6590da9b7e3da916af266617f663 (patch)
treee9978bb912c2b7c9e22d9a708475e0f71bdc9b75
parentad783baf35ad861a5c27926c37264350dc30940e (diff)
drop patch_system:: routines to print a gridfn directly to an already-open
stdio stream -- I don't think I'll ever use them git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@532 f88db872-0e4f-0410-b76b-b9085cfa78c5
-rw-r--r--src/patch/patch_system.cc47
-rw-r--r--src/patch/patch_system.hh8
2 files changed, 13 insertions, 42 deletions
diff --git a/src/patch/patch_system.cc b/src/patch/patch_system.cc
index f61cdde..0598077 100644
--- a/src/patch/patch_system.cc
+++ b/src/patch/patch_system.cc
@@ -20,8 +20,8 @@
// patch_system::patch_number_of_name
// patch_system::synchronize_ghost_zones
//
-// patch_system::print_gridfn
-// patch_system::print_ghosted_gridfn
+// patch_system::read_gridfn
+// patch_system::read_ghosted_gridfn
// patch_system::print_gridfn
// patch_system::print_ghosted_gridfn
//
@@ -1065,7 +1065,14 @@ if (output_fp == NULL)
,
gfn,
output_file_name); /*NOTREACHED*/
-print_gridfn(gfn, output_fp);
+
+ for (int pn = 0 ; pn < N_patches() ; ++pn)
+ {
+ const patch& p = ith_patch(pn);
+ p.print_gridfn(gfn, output_fp);
+ fprintf(output_fp, "\n");
+ }
+
std::fclose(output_fp);
}
@@ -1090,43 +1097,13 @@ if (output_fp == NULL)
,
ghosted_gfn,
output_file_name); /*NOTREACHED*/
-print_ghosted_gridfn(ghosted_gfn, output_fp, want_ghost_zones);
-std::fclose(output_fp);
-}
-
-//******************************************************************************
-
-//
-// This function prints a nominal-grid gridfn in ASCII format to an
-// already-open stdio stream. The output format is suitable for a
-// gnuplot 'splot' command.
-//
-void patch_system::print_gridfn(int gfn, FILE *output_fp = stdout) const
-{
- for (int pn = 0 ; pn < N_patches() ; ++pn)
- {
- const patch& p = ith_patch(pn);
- p.print_gridfn(gfn, output_fp);
- fprintf(output_fp, "\n");
- }
-}
-//******************************************************************************
-
-//
-// This function prints a ghosted-grid gridfn in ASCII format to an
-// already-open stdio stream. The output format is suitable for a
-// gnuplot 'splot' command.
-//
-void patch_system::print_ghosted_gridfn(int ghosted_gfn,
- FILE *output_fp = stdout,
- bool want_ghost_zones = true)
- const
-{
for (int pn = 0 ; pn < N_patches() ; ++pn)
{
const patch& p = ith_patch(pn);
p.print_ghosted_gridfn(ghosted_gfn, output_fp, want_ghost_zones);
fprintf(output_fp, "\n");
}
+
+std::fclose(output_fp);
}
diff --git a/src/patch/patch_system.hh b/src/patch/patch_system.hh
index 8091790..e11432f 100644
--- a/src/patch/patch_system.hh
+++ b/src/patch/patch_system.hh
@@ -121,18 +121,12 @@ public:
// ***** I/O *****
//
public:
- // ... to a named file (newly (re)created)
+ // print to a named file (newly (re)created)
void print_gridfn(int gfn, const char output_file_name[]) const;
void print_ghosted_gridfn(int ghosted_gfn,
const char output_file_name[],
bool want_ghost_zones = true)
const;
- // ... using an already-open stdio stream
- void print_gridfn(int gfn, FILE *output_fp = stdout) const;
- void print_ghosted_gridfn(int ghosted_gfn,
- FILE *output_fp = stdout,
- bool want_ghost_zones = true)
- const;
//
// ***** misc stuff *****