diff options
Diffstat (limited to 'src/Write1D.c')
-rw-r--r-- | src/Write1D.c | 88 |
1 files changed, 33 insertions, 55 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 |