aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@94b1c47f-dcfd-45ef-a468-0854c0e9e350>2000-10-20 09:53:54 +0000
committertradke <tradke@94b1c47f-dcfd-45ef-a468-0854c0e9e350>2000-10-20 09:53:54 +0000
commit2ed95b8415fe6930104cd969a3c33cd8486319b2 (patch)
tree644480fce3d5840e4ab1efc82ff3fd05d767ac73
parent3d3def010bf07cf96f0365a68e9ea9e199807b7a (diff)
Polished grdoc.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOASCII/trunk@30 94b1c47f-dcfd-45ef-a468-0854c0e9e350
-rw-r--r--src/Write1D.c88
-rw-r--r--src/Write2D.c22
2 files changed, 42 insertions, 68 deletions
diff --git a/src/Write1D.c b/src/Write1D.c
index 624e92a..6213b96 100644
--- a/src/Write1D.c
+++ b/src/Write1D.c
@@ -1,45 +1,21 @@
-
/*@@
- @routine Write1D.c
- @author Paul Walker
- @date March 1997
- @desc
- This pulls slices out of all the processors, collects those slices
- onto processor 0, and then writes them into an xgraph file.
- <p>
- The scoop: We use MPI_Gather and MPI_Gatherv to allow us to
- easily do the collection. Many processors (ones which contain no
- slice) send a 0 length vector, but that is OK. Then since the
- gather operation will line everything up, off we go and spew out
- the data into a text file. Everyone loves ascii slices...
- <p>
- This routine underwent a pretty major rewrite on Dec 31 97 - Jan 1 98
- to generally take out all the little hacks which had been put in place over
- the 9 months since it was first written. Also, comments were added.
- The two biggest changes were that:
- <ol>
- <li>MPI and Non-MPI versions are much more tightly interwoven.
- This means the Non-MPI version has to do a couple of
- extra memory copies, but makes the code much nicer...
- <li>Staggered and Non-Staggered grids should both work with
- one code chunk. This is an untested assumption...
- </ol>
- @enddesc
-
- @history
- @hauthor Thomas Radke @hdate 01 Apr 1999
- @hdesc The Non-MPI version now avoids the extra memory copies
- by simply assigning the send buffer pointer to the plot_data pointer.
- @hauthor Thomas Radke @hdate 30 May 2000
- @hdesc Get rid of all the PUGH stuff by using thorn Hyperslab.
- @hendhistory
- @version $Header$
-@@*/
-
-/*#define DEBUG_IOASCII*/
+ @file Write1D.c
+ @date March 1997
+ @author Paul Walker
+ @desc
+ Output one-dimensional lines in ASCII xgraph/gnuplot format.
+ @enddesc
+ @history
+ @hauthor Thomas Radke
+ @hdate 30 May 2000
+ @hdesc
+ Get rid of all the PUGH stuff by using thorn Hyperslab.
+ @endhdesc
+ @hendhistory
+ @version $Id$
+@@*/
-#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
@@ -57,6 +33,7 @@
static char *rcsid = "$Header$";
CCTK_FILEVERSION(CactusBase_IOASCII_Write1D_c)
+/*#define DEBUG_IOASCII 1*/
/* macro to output a 1D line (with coordinates for GFs) as typed data */
#define OUTPUT_TYPED_DATA(grouptype, hsize, coord_data, stagger_offset, \
@@ -88,32 +65,33 @@ CCTK_FILEVERSION(CactusBase_IOASCII_Write1D_c)
}
+/* this is needed by some preprocessors to pass into OUTPUT_TYPED_DATA
+ as a dummy macro */
#define NOTHING
+
/*@@
- @routine IOASCII_Write1D
- @date March 1999
- @author Gabrielle Allen
+ @routine IOASCII_Write1D
+ @date March 1999
+ @author Gabrielle Allen
@desc
- This routine does 1D output for a variable.
- <p>
- It creates/appends to ASCII files (suitable for gnuplot and xgraph)
- named after the given alias name, suffixed with ".xl", ".yl", ".zl",
- and ".dl" for the different slices. A header telling the physical
- time prefixes the output data.
+ This routine does 1D line output along the orthogonals
+ and the diagonal (in case of a cubed grid).
+ <p>
+ It writes to ASCII files suitable for gnuplot and xgraph.
+ A header telling the physical time prefixes the output data.
@enddesc
- @calledby Output1DGH Output1DVarAs TriggerOutput1D
- @history
-
- @endhistory
+ @calls IOUtil_RestartFromRecovery
+ IOUtil_AdvertiseFile
+ Hyperslab_GetHyperslab
+
@var GH
@vdesc Pointer to CCTK GH
- @vtype cGH
+ @vtype cGH *
@vio in
- @vcomment
@endvar
@var index
- @vdesc global index of variable
+ @vdesc global index of variable to output
@vtype int
@vio in
@endvar
diff --git a/src/Write2D.c b/src/Write2D.c
index d84e595..fe2e304 100644
--- a/src/Write2D.c
+++ b/src/Write2D.c
@@ -74,13 +74,15 @@ CCTK_FILEVERSION(CactusBase_IOASCII_Write2D_c)
/*@@
- @routine IOASCII_Write2D
- @date Thu May 11 2000
- @author Thomas Radke
+ @routine IOASCII_Write2D
+ @date Thu May 11 2000
+ @author Thomas Radke
@desc
- Writes the 2D slices of a variable into separate ASCII files.
+ Writes the 2D slices of a variable into separate ASCII files.
@enddesc
- @calls
+ @calls IOUtil_RestartFromRecovery
+ IOUtil_AdvertiseFile
+ Hyperslab_GetHyperslab
@var GH
@vdesc Pointer to CCTK GH
@@ -223,14 +225,8 @@ FIXME: get rid of PUGH here
/* advertise the file for downloading */
/* FIXME: this can go when we permanently switch the the
new filename scheme */
- if (new_filename_scheme)
- {
- advertised_file.slice = slicename;
- }
- else
- {
- advertised_file.slice = (char *) extensions[dir];
- }
+ advertised_file.slice = new_filename_scheme ?
+ slicename : (char *) extensions[dir];
advertised_file.thorn = CCTK_THORNSTRING;
advertised_file.varname = CCTK_FullName (index);
advertised_file.description = "Two-dimensional slice plots";