From 70bd7ede566ac356141de2d98699c65c6cee7927 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 18 Jun 2006 19:58:00 +0000 Subject: CarpetIOASCII: Produce fewer comments with out_fileinfo="none" Avoid all comment lines, except for two that describe which thorn produced this file. darcs-hash:20060618195814-dae7b-2d9686819eadde190e20a9a364e7ae5a77038e9a.gz --- Carpet/CarpetIOASCII/src/ioascii.cc | 96 ++++++++++++++++++++----------------- 1 file changed, 53 insertions(+), 43 deletions(-) (limited to 'Carpet/CarpetIOASCII/src') diff --git a/Carpet/CarpetIOASCII/src/ioascii.cc b/Carpet/CarpetIOASCII/src/ioascii.cc index f9fe736a0..fb008e8f8 100644 --- a/Carpet/CarpetIOASCII/src/ioascii.cc +++ b/Carpet/CarpetIOASCII/src/ioascii.cc @@ -669,18 +669,20 @@ namespace CarpetIOASCII { } // If this is the first time, then write a nice header if (is_new_file) { + bool want_labels = false; bool want_date = false; bool want_parfilename = false; bool want_other = false; if (CCTK_EQUALS (out_fileinfo, "none")) { // do nothing } else if (CCTK_EQUALS (out_fileinfo, "axis labels")) { - // do nothing + want_labels = true; } else if (CCTK_EQUALS (out_fileinfo, "creation date")) { want_date = true; } else if (CCTK_EQUALS (out_fileinfo, "parameter filename")) { want_parfilename = true; } else if (CCTK_EQUALS (out_fileinfo, "all")) { + want_labels = true; want_date = true; want_parfilename = true; want_other = true; @@ -723,18 +725,20 @@ namespace CarpetIOASCII { } } file << "#" << endl; - if (one_file_per_group) { - char* groupname = CCTK_GroupNameFromVarI(vindex); - file << "# " << groupname; - free (groupname); - } else { - file << "# " << varname; - } - for (int d=0; d=1 and dim<=3); - const char* const coords = "xyz"; - for (int d=0; d=1 and dim<=3); + const char* const coords = "xyz"; + for (int d=0; d