aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@94b1c47f-dcfd-45ef-a468-0854c0e9e350>2002-05-06 09:11:42 +0000
committertradke <tradke@94b1c47f-dcfd-45ef-a468-0854c0e9e350>2002-05-06 09:11:42 +0000
commit84df6a1831d14dcd7a80b7c65758919a78732df0 (patch)
treeb66b71102d27bfaf0b90d5dd5918292041b092d0
parent76d4e575a9901080e16d0558e9d65f7a1ec8fe22 (diff)
Parameter names changes as announced in today's mail to users@cactuscode.org.
You must also update thorn IOUtil now. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOASCII/trunk@113 94b1c47f-dcfd-45ef-a468-0854c0e9e350
-rw-r--r--doc/documentation.tex475
-rw-r--r--param.ccl280
-rw-r--r--schedule.ccl2
-rw-r--r--src/ChooseOutput.c29
-rw-r--r--src/Output1D.c36
-rw-r--r--src/Output2D.c44
-rw-r--r--src/Output3D.c44
-rw-r--r--src/Startup.c24
-rw-r--r--src/Write1D.c24
-rw-r--r--src/Write2D.c8
-rw-r--r--src/Write3D.c4
-rw-r--r--src/ioASCIIGH.h2
12 files changed, 419 insertions, 553 deletions
diff --git a/doc/documentation.tex b/doc/documentation.tex
index b78a39b..99813d9 100644
--- a/doc/documentation.tex
+++ b/doc/documentation.tex
@@ -7,84 +7,44 @@
\date{December 2001}
\maketitle
-\abstract{Thorn IOASCII provides I/O methods for 1D, 2D, and 3D output of
+\abstract{Thorn {\bf IOASCII} provides I/O methods for 1D, 2D, and 3D output of
grid arrays into files in ASCII format. The precise format is designed for
visualisation using the clients {\tt xgraph} or {\tt gnuplot}.}
\section{Purpose}
-Thorn IOASCII registers three I/O methods named {\tt IOASCII\_1D}, {\tt IOASCII\_2D}, and
+Thorn {\bf IOASCII} registers three I/O methods named {\tt IOASCII\_1D}, {\tt IOASCII\_2D}, and
{\tt IOASCII\_3D} with the I/O interface in the flesh.
\begin{itemize}
-
- \item {\tt IOASCII\_1D}
-
- creates one-dimensional output of 1D, 2D and
- 3D grid functions and arrays by slicing through the edge (in the
- octant case) or center (in all origin centered cases) of the grid in
- the coordinate directions. In addition, output is provided
- along a diagonal of the grid, in this case the diagonal always starts
- at the first grid point (that is, in Fortran notation {\tt var(1,1,1)})
- and the line taken uses grid points increasing by 1 in each direction.
- [NOTE: The diagonal output is not yet available for staggered variables].
-
- Output for each direction can be
- selected individually via parameters.
-
- Data is written in ASCII format and goes into files named
-
- {\tt <GF\_name>.[xyzd]}
-
- with the default behaviour in each grid dimension being to create
- the following files:
-
- \begin{center}
- \begin{tabular}{cc}
- Array dimension & Default output \\
- 3D & {\tt xl yl zl dl} \\
- 2D & {\tt xl yl dl} \\
- 1D & {\tt xl}
- \end{tabular}
- \end{center}
-
- These files can be processed directly by either xgraph or gnuplot
- (you can select the style of output via parameter settings).
-
- \item {\tt IOASCII\_2D}
-
- outputs two-dimensional slices of grid functions and arrays planes.
- Again, slicing is done through the edge (in the
- octant case) or center (in all origin centered cases).\\ Data is
- written in ASCII format and goes into files named
-
- {\tt <varname>\_2d\_[\{xy\}\{xz\}\{yz\}].gnuplot}
-
- The default behaviour in each grid dimension is to create
- the following files:
-
- \begin{center}
- \begin{tabular}{cc}
- Array dimension & Default output \\
- 3D & {\tt xy yz xz} \\
- 2D & {\tt xy}
- \end{tabular}
- \end{center}
-
- These files can be
- visualized by gnuplot using its {\it splot} command.
-
- \item {\tt IOASCII\_3D}
-
- outputs three-dimensional grid functions and arrays as
- a whole.
-
- Data is written in ASCII format and goes into files named
-
- {\tt <varname>\_3D.asc}
-
- These files can be visualized by gnuplot
- using its {\it splot} command.
-
+ \item {\tt IOASCII\_1D}\\
+ creates one-dimensional output of 1D, 2D and
+ 3D grid functions and arrays by slicing through the edge (in the
+ octant case) or center (in all origin centered cases) of the grid in
+ the coordinate directions. In addition, output is provided
+ along a diagonal of the grid, in this case the diagonal always starts
+ at the first grid point (that is, in Fortran notation {\tt var(1,1,1)})
+ and the line taken uses grid points increasing by 1 in each direction.
+ [NOTE: The diagonal output is not available for staggered variables].\\
+ Output for each direction can be selected individually via parameters.\\
+ Data is written in ASCII format and goes into files named
+ {\tt <variable\_name>\_<slice>\_[<center\_i>][<center\_j>].\{asc|xg\}}
+ and {\tt <variable\_name>\_3D\_diagonal.\{asc|xg\}} for diagonals.\\
+ These files can be processed directly by either xgraph or gnuplot
+ (you can select the style of output via parameter settings).
+
+ \item {\tt IOASCII\_2D}
+ outputs two-dimensional slices of grid functions and arrays planes.
+ Again, slicing is done through the edge (in the octant case) or center
+ (in all origin centered cases).\\
+ Data is written in ASCII format and goes into files named
+ {\tt <variable\_name>\_<plane>\_[<center>].\{asc|xg\}}.\\
+ These files can be visualized by gnuplot using its {\it splot} command.
+
+ \item {\tt IOASCII\_3D}
+ outputs three-dimensional grid functions and arrays as a whole.\\
+ Data is written in ASCII format and goes into files named
+ {\tt <variable\_name>.\{asc|xg\}}.\\
+ These files can be visualized by gnuplot using its {\it splot} command.
\end{itemize}
%
You obtain output by an I/O method by either
@@ -96,313 +56,266 @@ You obtain output by an I/O method by either
%
For a description of basic I/O parameters and the I/O function interface to
invoke I/O methods by application thorns please see the documentation of thorn
-IOUtil and the flesh.
+{\bf IOUtil} and the flesh.
%
\section{Comments}
IMPORTANT: Must select data to output AFTER spatial coordinates are set up
-
-
-
-%
-Since IOASCII uses parameters from IOUtil
+Since {\bf IOASCII} uses parameters from {\bf IOUtil}
it also needs this I/O utility thorn be compiled into Cactus and activated.
\section{Examples}
-In this section we include example output for different parameter combinations.
+In this section we include example output for different parameter combinations.
Note that all these examples were generated for just a couple of timesteps for an extremely small 3D grid.
-\subsection{One dimensional xgraph}
-
-These options produce data suitable for using with the xgraph visualization client
-in the format
-{\tt
-\begin{verbatim}
-x f(t=fixed,x,y=fixed,z=fixed)
-\end{verbatim}
-}
+\subsection{One-dimensional xgraph}
+These options produce data suitable for using with the xgraph visualization client in the format {\tt x f(t=fixed,x,y=fixed,z=fixed)}:
-{\tt
\begin{verbatim}
-IOASCII::out1D_every = 1
-IOASCII::out1D_vars = "wavetoy::phi"
-IOASCII::out1D_style = "xgraph"
+ IOASCII::out1D_every = 1
+ IOASCII::out1D_vars = "wavetoy::phi"
+ IOASCII::out1D_style = "xgraph"
\end{verbatim}
-}
\noindent
-{\bf Output File: phi.xl}
+{\bf Output File: phi\_x\_[1][1].xg}
-{\tt
\begin{verbatim}
-"Parameter file wavetoy.par
-"Created Sun 19 Aug 2001 16:31:43
-"x-label x
-"y-label WAVETOY::phi (y = 0.0000000000000, z = 0.0000000000000), (yi = 1, zi = 1)
+ "Parameter file wavetoy.par
+ "Created Sun 19 Aug 2001 16:31:43
+ "x-label x
+ "y-label WAVETOY::phi (y = 0.0000000000000, z = 0.0000000000000), (yi = 1, zi = 1)
-"Time = 0.0000000000000
--0.5000000000000 0.0000000000139
-0.0000000000000 1.0000000000000
-0.5000000000000 0.0000000000139
+ "Time = 0.0000000000000
+ -0.5000000000000 0.0000000000139
+ 0.0000000000000 1.0000000000000
+ 0.5000000000000 0.0000000000139
-"Time = 0.2500000000000
--0.5000000000000 0.0000000000000
-0.0000000000000 0.4980695458846
-0.5000000000000 0.0000000000000
+ "Time = 0.2500000000000
+ -0.5000000000000 0.0000000000000
+ 0.0000000000000 0.4980695458846
+ 0.5000000000000 0.0000000000000
-"Time = 0.5000000000000
--0.5000000000000 0.0019304541362
-0.0000000000000 -0.7509652270577
-0.5000000000000 0.0019304541362
+ "Time = 0.5000000000000
+ -0.5000000000000 0.0019304541362
+ 0.0000000000000 -0.7509652270577
+ 0.5000000000000 0.0019304541362
\end{verbatim}
-}
-\subsection{One dimensional gnuplot}
-These options produce data suitable for using with the gnuplot visualization client in the format
-{\tt
-\begin{verbatim}
-x f(t,x,y=fixed,z=fixed)
-\end{verbatim}
-}
+\subsection{One-dimensional gnuplot}
+These options produce data suitable for using with the gnuplot visualization client in the format {\tt x f(t,x,y=fixed,z=fixed)}:
-{\tt
\begin{verbatim}
-IOASCII::out1D_every = 1
-IOASCII::out1D_vars = "wavetoy::phi"
-IOASCII::out1D_style = "gnuplot f(x)"
+ IOASCII::out1D_every = 1
+ IOASCII::out1D_vars = "wavetoy::phi"
+ IOASCII::out1D_style = "gnuplot f(x)"
\end{verbatim}
-}
\noindent
-{\bf Output File: phi.xl}
+{\bf Output File: phi\_x\_[1][1].asc}
-{\tt
\begin{verbatim}
-#Parameter file wavetoy.par
-#Created Sun 19 Aug 2001 16:33:07
-#x-label x
-#y-label WAVETOY::phi (y = 0.0000000000000, z = 0.0000000000000), (yi = 1, zi = 1)
-
-#Time = 0.0000000000000
--0.5000000000000 0.0000000000139
-0.0000000000000 1.0000000000000
-0.5000000000000 0.0000000000139
-
-#Time = 0.2500000000000
--0.5000000000000 0.0000000000000
-0.0000000000000 0.4980695458846
-0.5000000000000 0.0000000000000
-
-#Time = 0.5000000000000
--0.5000000000000 0.0019304541362
-0.0000000000000 -0.7509652270577
-0.5000000000000 0.0019304541362
+ #Parameter file wavetoy.par
+ #Created Sun 19 Aug 2001 16:33:07
+ #x-label x
+ #y-label WAVETOY::phi (y = 0.0000000000000, z = 0.0000000000000), (yi = 1, zi = 1)
+
+ #Time = 0.0000000000000
+ -0.5000000000000 0.0000000000139
+ 0.0000000000000 1.0000000000000
+ 0.5000000000000 0.0000000000139
+
+ #Time = 0.2500000000000
+ -0.5000000000000 0.0000000000000
+ 0.0000000000000 0.4980695458846
+ 0.5000000000000 0.0000000000000
+
+ #Time = 0.5000000000000
+ -0.5000000000000 0.0019304541362
+ 0.0000000000000 -0.7509652270577
+ 0.5000000000000 0.0019304541362
\end{verbatim}
-}
-\subsection{One dimensional gnuplot (including time)}
+\subsection{One-dimensional gnuplot (including time)}
-These options produce data suitable for using with the gnuplot visualization client in the format
-{\tt
-\begin{verbatim}
-t x f(t,x,y=fixed,z=fixed)
-\end{verbatim}
-}
+These options produce data suitable for using with the gnuplot visualization client in the format {\tt t x f(t,x,y=fixed,z=fixed)}:
-{\tt
\begin{verbatim}
-IOASCII::out1D_every = 1
-IOASCII::out1D_vars = "wavetoy::phi"
-IOASCII::out1D_style = "gnuplot f(t,x)"
+ IOASCII::out1D_every = 1
+ IOASCII::out1D_vars = "wavetoy::phi"
+ IOASCII::out1D_style = "gnuplot f(t,x)"
\end{verbatim}
-}
\noindent
-{\bf Output file: phi.xl}
-{\tt
+{\bf Output file: phi\_x\_[1][1].asc}
+
\begin{verbatim}
-#Parameter file wavetoy.par
-#Created Sun 19 Aug 2001 16:34:48
-#x-label x
-#y-label WAVETOY::phi (y = 0.0000000000000, z = 0.0000000000000), (yi = 1, zi = 1)
-
-#Time = 0.0000000000000
-0.0000000000000 -0.5000000000000 0.0000000000139
-0.0000000000000 0.0000000000000 1.0000000000000
-0.0000000000000 0.5000000000000 0.0000000000139
-
-#Time = 0.2500000000000
-0.2500000000000 -0.5000000000000 0.0000000000000
-0.2500000000000 0.0000000000000 0.4980695458846
-0.2500000000000 0.5000000000000 0.0000000000000
-
-#Time = 0.5000000000000
-0.5000000000000 -0.5000000000000 0.0019304541362
-0.5000000000000 0.0000000000000 -0.7509652270577
-0.5000000000000 0.5000000000000 0.0019304541362
+ #Parameter file wavetoy.par
+ #Created Sun 19 Aug 2001 16:34:48
+ #x-label x
+ #y-label WAVETOY::phi (y = 0.0000000000000, z = 0.0000000000000), (yi = 1, zi = 1)
+
+ #Time = 0.0000000000000
+ 0.0000000000000 -0.5000000000000 0.0000000000139
+ 0.0000000000000 0.0000000000000 1.0000000000000
+ 0.0000000000000 0.5000000000000 0.0000000000139
+
+ #Time = 0.2500000000000
+ 0.2500000000000 -0.5000000000000 0.0000000000000
+ 0.2500000000000 0.0000000000000 0.4980695458846
+ 0.2500000000000 0.5000000000000 0.0000000000000
+
+ #Time = 0.5000000000000
+ 0.5000000000000 -0.5000000000000 0.0019304541362
+ 0.5000000000000 0.0000000000000 -0.7509652270577
+ 0.5000000000000 0.5000000000000 0.0019304541362
\end{verbatim}
-}
-\subsection{Two dimensional gnuplot}
-These options produce data suitable for using with the gnuplot visualization client in the format
-{\tt
-\begin{verbatim}
-x y f(t,x,y,z=fixed)
-\end{verbatim}
-}
+\subsection{Two-dimensional gnuplot}
+These options produce data suitable for using with the gnuplot visualization client in the format {\tt x y f(t,x,y,z=fixed)}:
-{\tt
\begin{verbatim}
-IOASCII::out2D_every = 1
-IOASCII::out2D_vars = "wavetoy::phi"
-IOASCII::out2D_style = "gnuplot f(x,y)"
+ IOASCII::out2D_every = 1
+ IOASCII::out2D_vars = "wavetoy::phi"
+ IOASCII::out2D_style = "gnuplot f(x,y)"
\end{verbatim}
-}
\noindent
-{\bf Output file: phi\_2d\_xy.gnuplot}
-{\tt
+{\bf Output file: phi\_xy\_[1].asc}
+
\begin{verbatim}
-#Parameter file wavetoy.par
-#Created Sun 19 Aug 2001 16:31:43
-#x-label x
-#y-label y
-#z-label WAVETOY::phi (z = 0.0000000000000), (zi = 1)
+ #Parameter file wavetoy.par
+ #Created Sun 19 Aug 2001 16:31:43
+ #x-label x
+ #y-label y
+ #z-label WAVETOY::phi (z = 0.0000000000000), (zi = 1)
-#Time = 0.0000000000000
--0.5000000000000 -0.5000000000000 0.0000000000000
-0.0000000000000 -0.5000000000000 0.0000000000139
-0.5000000000000 -0.5000000000000 0.0000000000000
+ #Time = 0.0000000000000
+ -0.5000000000000 -0.5000000000000 0.0000000000000
+ 0.0000000000000 -0.5000000000000 0.0000000000139
+ 0.5000000000000 -0.5000000000000 0.0000000000000
--0.5000000000000 0.0000000000000 0.0000000000139
-0.0000000000000 0.0000000000000 1.0000000000000
-0.5000000000000 0.0000000000000 0.0000000000139
+ -0.5000000000000 0.0000000000000 0.0000000000139
+ 0.0000000000000 0.0000000000000 1.0000000000000
+ 0.5000000000000 0.0000000000000 0.0000000000139
--0.5000000000000 0.5000000000000 0.0000000000000
-0.0000000000000 0.5000000000000 0.0000000000139
-0.5000000000000 0.5000000000000 0.0000000000000
+ -0.5000000000000 0.5000000000000 0.0000000000000
+ 0.0000000000000 0.5000000000000 0.0000000000139
+ 0.5000000000000 0.5000000000000 0.0000000000000
-#Time = 0.2500000000000
--0.5000000000000 -0.5000000000000 0.0000000000000
-0.0000000000000 -0.5000000000000 0.0000000000000
-0.5000000000000 -0.5000000000000 0.0000000000000
+ #Time = 0.2500000000000
+ -0.5000000000000 -0.5000000000000 0.0000000000000
+ 0.0000000000000 -0.5000000000000 0.0000000000000
+ 0.5000000000000 -0.5000000000000 0.0000000000000
--0.5000000000000 0.0000000000000 0.0000000000000
-0.0000000000000 0.0000000000000 0.4980695458846
-0.5000000000000 0.0000000000000 0.0000000000000
+ -0.5000000000000 0.0000000000000 0.0000000000000
+ 0.0000000000000 0.0000000000000 0.4980695458846
+ 0.5000000000000 0.0000000000000 0.0000000000000
--0.5000000000000 0.5000000000000 0.0000000000000
-0.0000000000000 0.5000000000000 0.0000000000000
-0.5000000000000 0.5000000000000 0.0000000000000
+ -0.5000000000000 0.5000000000000 0.0000000000000
+ 0.0000000000000 0.5000000000000 0.0000000000000
+ 0.5000000000000 0.5000000000000 0.0000000000000
-#Time = 0.5000000000000
--0.5000000000000 -0.5000000000000 0.0000000008425
-0.0000000000000 -0.5000000000000 0.0019304541362
-0.5000000000000 -0.5000000000000 0.0000000008425
+ #Time = 0.5000000000000
+ -0.5000000000000 -0.5000000000000 0.0000000008425
+ 0.0000000000000 -0.5000000000000 0.0019304541362
+ 0.5000000000000 -0.5000000000000 0.0000000008425
--0.5000000000000 0.0000000000000 0.0019304541362
-0.0000000000000 0.0000000000000 -0.7509652270577
-0.5000000000000 0.0000000000000 0.0019304541362
+ -0.5000000000000 0.0000000000000 0.0019304541362
+ 0.0000000000000 0.0000000000000 -0.7509652270577
+ 0.5000000000000 0.0000000000000 0.0019304541362
--0.5000000000000 0.5000000000000 0.0000000008425
-0.0000000000000 0.5000000000000 0.0019304541362
-0.5000000000000 0.5000000000000 0.0000000008425
+ -0.5000000000000 0.5000000000000 0.0000000008425
+ 0.0000000000000 0.5000000000000 0.0019304541362
+ 0.5000000000000 0.5000000000000 0.0000000008425
\end{verbatim}
-}
-\subsection{Two dimensional gnuplot (including time)}
-These options produce data suitable for using with the gnuplot visualization client in the format
-{\tt
-\begin{verbatim}
-t x y f(t,x,y,z=fixed)
-\end{verbatim}
-}
+\subsection{Two-dimensional gnuplot (including time)}
+These options produce data suitable for using with the gnuplot visualization client in the format {\tt t x y f(t,x,y,z=fixed)}:
-
-{\tt
\begin{verbatim}
-IOASCII::out2D_every = 1
-IOASCII::out2D_vars = "wavetoy::phi"
-IOASCII::out2D_style = "gnuplot f(t,x,y)"
+ IOASCII::out2D_every = 1
+ IOASCII::out2D_vars = "wavetoy::phi"
+ IOASCII::out2D_style = "gnuplot f(t,x,y)"
\end{verbatim}
-}
+
\noindent
-{\bf Output file: phi\_2d\_xy.gnuplot}
-{\tt
+{\bf Output file: phi\_xy\_[1].asc}
+
\begin{verbatim}
-#Parameter file wavetoy.par
-#Created Sun 19 Aug 2001 16:33:07
-#x-label x
-#y-label y
-#z-label WAVETOY::phi (z = 0.0000000000000), (zi = 1)
+ #Parameter file wavetoy.par
+ #Created Sun 19 Aug 2001 16:33:07
+ #x-label x
+ #y-label y
+ #z-label WAVETOY::phi (z = 0.0000000000000), (zi = 1)
-#Time = 0.0000000000000
-0.0000000000000 -0.5000000000000 -0.5000000000000 0.0000000000000
-0.0000000000000 0.0000000000000 -0.5000000000000 0.0000000000139
-0.0000000000000 0.5000000000000 -0.5000000000000 0.0000000000000
+ #Time = 0.0000000000000
+ 0.0000000000000 -0.5000000000000 -0.5000000000000 0.0000000000000
+ 0.0000000000000 0.0000000000000 -0.5000000000000 0.0000000000139
+ 0.0000000000000 0.5000000000000 -0.5000000000000 0.0000000000000
-0.0000000000000 -0.5000000000000 0.0000000000000 0.0000000000139
-0.0000000000000 0.0000000000000 0.0000000000000 1.0000000000000
-0.0000000000000 0.5000000000000 0.0000000000000 0.0000000000139
+ 0.0000000000000 -0.5000000000000 0.0000000000000 0.0000000000139
+ 0.0000000000000 0.0000000000000 0.0000000000000 1.0000000000000
+ 0.0000000000000 0.5000000000000 0.0000000000000 0.0000000000139
-0.0000000000000 -0.5000000000000 0.5000000000000 0.0000000000000
-0.0000000000000 0.0000000000000 0.5000000000000 0.0000000000139
-0.0000000000000 0.5000000000000 0.5000000000000 0.0000000000000
+ 0.0000000000000 -0.5000000000000 0.5000000000000 0.0000000000000
+ 0.0000000000000 0.0000000000000 0.5000000000000 0.0000000000139
+ 0.0000000000000 0.5000000000000 0.5000000000000 0.0000000000000
-#Time = 0.2500000000000
-0.2500000000000 -0.5000000000000 -0.5000000000000 0.0000000000000
-0.2500000000000 0.0000000000000 -0.5000000000000 0.0000000000000
-0.2500000000000 0.5000000000000 -0.5000000000000 0.0000000000000
+ #Time = 0.2500000000000
+ 0.2500000000000 -0.5000000000000 -0.5000000000000 0.0000000000000
+ 0.2500000000000 0.0000000000000 -0.5000000000000 0.0000000000000
+ 0.2500000000000 0.5000000000000 -0.5000000000000 0.0000000000000
-0.2500000000000 -0.5000000000000 0.0000000000000 0.0000000000000
-0.2500000000000 0.0000000000000 0.0000000000000 0.4980695458846
-0.2500000000000 0.5000000000000 0.0000000000000 0.0000000000000
+ 0.2500000000000 -0.5000000000000 0.0000000000000 0.0000000000000
+ 0.2500000000000 0.0000000000000 0.0000000000000 0.4980695458846
+ 0.2500000000000 0.5000000000000 0.0000000000000 0.0000000000000
-0.2500000000000 -0.5000000000000 0.5000000000000 0.0000000000000
-0.2500000000000 0.0000000000000 0.5000000000000 0.0000000000000
-0.2500000000000 0.5000000000000 0.5000000000000 0.0000000000000
+ 0.2500000000000 -0.5000000000000 0.5000000000000 0.0000000000000
+ 0.2500000000000 0.0000000000000 0.5000000000000 0.0000000000000
+ 0.2500000000000 0.5000000000000 0.5000000000000 0.0000000000000
-#Time = 0.5000000000000
-0.5000000000000 -0.5000000000000 -0.5000000000000 0.0000000008425
-0.5000000000000 0.0000000000000 -0.5000000000000 0.0019304541362
-0.5000000000000 0.5000000000000 -0.5000000000000 0.0000000008425
+ #Time = 0.5000000000000
+ 0.5000000000000 -0.5000000000000 -0.5000000000000 0.0000000008425
+ 0.5000000000000 0.0000000000000 -0.5000000000000 0.0019304541362
+ 0.5000000000000 0.5000000000000 -0.5000000000000 0.0000000008425
-0.5000000000000 -0.5000000000000 0.0000000000000 0.0019304541362
-0.5000000000000 0.0000000000000 0.0000000000000 -0.7509652270577
-0.5000000000000 0.5000000000000 0.0000000000000 0.0019304541362
+ 0.5000000000000 -0.5000000000000 0.0000000000000 0.0019304541362
+ 0.5000000000000 0.0000000000000 0.0000000000000 -0.7509652270577
+ 0.5000000000000 0.5000000000000 0.0000000000000 0.0019304541362
-0.5000000000000 -0.5000000000000 0.5000000000000 0.0000000008425
-0.5000000000000 0.0000000000000 0.5000000000000 0.0019304541362
-0.5000000000000 0.5000000000000 0.5000000000000 0.0000000008425
+ 0.5000000000000 -0.5000000000000 0.5000000000000 0.0000000008425
+ 0.5000000000000 0.0000000000000 0.5000000000000 0.0019304541362
+ 0.5000000000000 0.5000000000000 0.5000000000000 0.0000000008425
\end{verbatim}
-}
+
%
-% Automatically created from the ccl files
+% Automatically created from the ccl files
% Do not worry for now.
\include{interface}
\include{param}
diff --git a/param.ccl b/param.ccl
index 9d0f2c4..34b7644 100644
--- a/param.ccl
+++ b/param.ccl
@@ -10,89 +10,110 @@ private:
##########################
# Directories to output to
##########################
-STRING outdir1D "Name of 1D ASCII output directory, overrides IO::outdir"
+STRING out1D_dir "Output directory for 1D IOASCII files, overrides IO::out_dir" STEERABLE = RECOVER
{
- .* :: "Any valid directory name, an empty string defaults to outdir"
+ ".+" :: "A valid directory name"
+ "^$" :: "An empty string to choose the default from IO::out_dir"
} ""
-
-STRING outdir2D "Name of 2D ASCII output directory, overrides outdir"
+STRING out2D_dir "Output directory for 2D IOASCII files, overrides out_dir" STEERABLE = RECOVER
{
- .* :: "Any valid directory name, an empty string defaults to outdir"
+ ".+" :: "A valid directory name"
+ "^$" :: "An empty string to choose the default from IO::out_dir"
} ""
-
-STRING outdir3D "Name of 3D ASCII output directory, overrides IO::outdir"
+STRING out3D_dir "Output directory for 3D IOASCII files, overrides IO::out_dir" STEERABLE = RECOVER
+{
+ ".+" :: "A valid directory name"
+ "^$" :: "An empty string to choose the default from IO::out_dir"
+} ""
+STRING outdir1D "Output directory for 1D IOASCII files, overrides IO::out_dir (DEPRECATED IN BETA13)" STEERABLE = RECOVER
+{
+ ".+" :: "A valid directory name"
+ "^$" :: "An empty string to choose the default from IO::out_dir"
+} ""
+STRING outdir2D "Output directory for 2D IOASCII files, overrides out_dir (DEPRECATED IN BETA13)" STEERABLE = RECOVER
{
- .* :: "Any valid directory name, an empty string defaults to outdir"
+ ".+" :: "A valid directory name"
+ "^$" :: "An empty string to choose the default from IO::out_dir"
+} ""
+STRING outdir3D "Output directory for 3D IOASCII files, overrides IO::out_dir (DEPRECATED IN BETA13)" STEERABLE = RECOVER
+{
+ ".+" :: "A valid directory name"
+ "^$" :: "An empty string to choose the default from IO::out_dir"
} ""
##########################
# What variables to output
##########################
-STRING out1D_vars "Variables to output in 1D ASCII file format" STEERABLE = ALWAYS
+STRING out1D_vars "Variables to output in 1D IOASCII file format" STEERABLE = ALWAYS
{
- .* :: "A regex which matches everything"
+ ".+" :: "Space-separated list of fully qualified variable/group names"
+ "^$" :: "An empty string to output nothing"
} ""
-
-STRING out2D_vars "Variables to output in 2D ASCII file format" STEERABLE = ALWAYS
+STRING out2D_vars "Variables to output in 2D IOASCII file format" STEERABLE = ALWAYS
{
- .* :: "A regex which matches everything"
+ ".+" :: "Space-separated list of fully qualified variable/group names"
+ "^$" :: "An empty string to output nothing"
} ""
-
-STRING out3D_vars "Variables to output in 3D ASCII file format" STEERABLE = ALWAYS
+STRING out3D_vars "Variables to output in 3D IOASCII file format" STEERABLE = ALWAYS
{
- .* :: "A regex which matches everything"
+ ".+" :: "Space-separated list of fully qualified variable/group names"
+ "^$" :: "An empty string to output nothing"
} ""
########################
# How often to do output
########################
-INT out1D_every "How often to do 1D ASCII output, overrides out_every" STEERABLE = ALWAYS
+INT out1D_every "How often to do 1D IOASCII output, overrides IO::out_every" STEERABLE = ALWAYS
{
- -1:* :: "Values <= 0 disable 1D output"
+ 1:* :: "Every so many iterations"
+ 0: :: "Disable 1D IOASCII output"
+ -1: :: "Default to IO::out_every"
} -1
-
-INT out2D_every "How often to do 2D ASCII output, overrides out_every" STEERABLE = ALWAYS
+INT out2D_every "How often to do 2D IOASCII output, overrides IO::out_every" STEERABLE = ALWAYS
{
- -1:* :: "Values <= 0 disable 2D output"
+ 1:* :: "Every so many iterations"
+ 0: :: "Disable 2D IOASCII output"
+ -1: :: "Default to IO::out_every"
} -1
-
-INT out3D_every "How often to do 3D ASCII output, overrides out_every" STEERABLE = ALWAYS
+INT out3D_every "How often to do 3D IOASCII output, overrides IO::out_every" STEERABLE = ALWAYS
{
- -1:* :: "Values <= 0 disable 3D output"
+ 1:* :: "Every so many iterations"
+ 0: :: "Disable 3D IOASCII output"
+ -1: :: "Default to IO::out_every"
} -1
#################
# output style
#################
-KEYWORD out_style "Which style for 1D ASCII output (DEPRICATED IN BETA12)"
+KEYWORD out_style "Which style for 1D IOASCII output (DEPRICATED IN BETA12)"
{
"gnuplot" :: "output readable by gnuplot"
"xgraph" :: "output readable by xgraph"
} "xgraph"
-KEYWORD out1D_style "Which style for 1D lines ASCII output"
+KEYWORD out1D_style "Which style for 1D lines IOASCII output"
{
"xgraph" :: "f over x plots suitable for xgraph"
"gnuplot f(x)" :: "f over x plots suitable for gnuplot"
"gnuplot f(t,x)" :: "f over t,x plots suitable for gnuplot"
} "xgraph"
-KEYWORD out2D_style "Which style for 2D slices ASCII output"
+KEYWORD out2D_style "Which style for 2D slices IOASCII output"
{
"gnuplot f(x,y)" :: "f over x,y plots suitable for gnuplot"
"gnuplot f(t,x,y)" :: "f over t,x,y plots suitable for gnuplot"
} "gnuplot f(x,y)"
-KEYWORD out3D_style "Which style for 3D volume ASCII output"
+KEYWORD out3D_style "Which style for 3D volume IOASCII output"
{
"gnuplot f(x,y,z)" :: "f over x,y,z plots suitable for gnuplot"
"gnuplot f(t,x,y,z)" :: "f over t,x,y,z plots suitable for gnuplot"
} "gnuplot f(x,y,z)"
-STRING out_format "Which format for ASCII floating-point number output" STEERABLE = ALWAYS
+STRING out_format "Which format for IOASCII floating-point number output" STEERABLE = ALWAYS
{
"^(\.[0-9]{1,2})?[EGefg]$" :: "output with given precision in exponential / floating point notation"
} ".13f"
@@ -115,95 +136,109 @@ BOOLEAN out1D_d "Do 1D IOASCII output in the diagonal-direction" STEERABLE = ALW
{
} "yes"
-CCTK_REAL out1D_xline_y "y-coord for 1D lines in x-direction"
+################################
+# Choosing what slices to output
+################################
+REAL out1D_xline_y "y-coord for 1D lines in x-direction" STEERABLE = RECOVER
{
- *:* :: ""
-} 0.0
-CCTK_REAL out1D_xline_z "z-coord for 1D lines in x-direction"
+ *:* :: "A value between [ymin, ymax]"
+ -424242: :: "Default to IO::out_xline_y"
+} -424242
+REAL out1D_xline_z "z-coord for 1D lines in x-direction" STEERABLE = RECOVER
{
- *:* :: ""
-} 0.0
-
-CCTK_REAL out1D_yline_x "x-coord for 1D lines in y-direction"
+ *:* :: "A value between [zmin, zmax]"
+ -424242: :: "Default to IO::out_xline_z"
+} -424242
+REAL out1D_yline_x "x-coord for 1D lines in y-direction" STEERABLE = RECOVER
{
- *:* :: ""
-} 0.0
-CCTK_REAL out1D_yline_z "z-coord for 1D lines in y-direction"
+ *:* :: "A value between [xmin, xmax]"
+ -424242: :: "Default to IO::out_yline_x"
+} -424242
+REAL out1D_yline_z "z-coord for 1D lines in y-direction" STEERABLE = RECOVER
{
- *:* :: ""
-} 0.0
-
-CCTK_REAL out1D_zline_x "x-coord for 1D lines in z-direction"
+ *:* :: "A value between [zmin, zmax]"
+ -424242: :: "Default to IO::out_yline_z"
+} -424242
+REAL out1D_zline_x "x-coord for 1D lines in z-direction" STEERABLE = RECOVER
{
- *:* :: ""
-} 0.0
-CCTK_REAL out1D_zline_y "y-coord for 1D lines in z-direction"
+ *:* :: "A value between [xmin, xmax]"
+ -424242: :: "Default to IO::out_zline_x"
+} -424242
+REAL out1D_zline_y "y-coord for 1D lines in z-direction" STEERABLE = RECOVER
{
- *:* :: ""
-} 0.0
+ *:* :: "A value between [ymin, ymax]"
+ -424242: :: "Default to IO::out_zline_y"
+} -424242
-CCTK_INT out1D_xline_yi "y-index (from 0) for 1D lines in x-direction"
+INT out1D_xline_yi "y-index (from 0) for 1D lines in x-direction" STEERABLE = RECOVER
{
- 0:* :: ""
-} 0
-CCTK_INT out1D_xline_zi "z-index (from 0) for 1D lines in x-direction"
+ 0:* :: "An index between [0, ny)"
+ -1: :: "Choose the default from IO::out_xline_yi"
+} -1
+INT out1D_xline_zi "z-index (from 0) for 1D lines in x-direction" STEERABLE = RECOVER
{
- 0:* :: ""
-} 0
+ 0:* :: "An index between [0, nz)"
+ -1: :: "Choose the default from IO::out_xline_zi"
+} -1
-CCTK_INT out1D_yline_xi "x-index (from 0) for 1D lines in y-direction"
+INT out1D_yline_xi "x-index (from 0) for 1D lines in y-direction" STEERABLE = RECOVER
{
- 0:* :: ""
-} 0
-CCTK_INT out1D_yline_zi "z-index (from 0) for 1D lines in y-direction"
+ 0:* :: "An index between [0, nx)"
+ -1: :: "Choose the default from IO::out_yline_xi"
+} -1
+INT out1D_yline_zi "z-index (from 0) for 1D lines in y-direction" STEERABLE = RECOVER
{
- 0:* :: ""
-} 0
+ 0:* :: "An index between [0, nz)"
+ -1: :: "Choose the default from IO::out_yline_zi"
+} -1
-CCTK_INT out1D_zline_xi "x-index (from 0) for 1D lines in z-direction"
+INT out1D_zline_xi "x-index (from 0) for 1D lines in z-direction" STEERABLE = RECOVER
{
- 0:* :: ""
-} 0
-CCTK_INT out1D_zline_yi "y-index (from 0) for 1D lines in z-direction"
+ 0:* :: "An index between [0, nx)"
+ -1: :: "Choose the default from IO::out_zline_xi"
+} -1
+INT out1D_zline_yi "y-index (from 0) for 1D lines in z-direction" STEERABLE = RECOVER
{
- 0:* :: ""
-} 0
+ 0:* :: "An index between [0, ny)"
+ -1: :: "Choose the default from IO::out_zline_yi"
+} -1
-############################
+################################
# Specific to 2D output
-# Choosing what output to do
-############################
-CCTK_REAL out2D_yzplane_x "x-coord for 2D planes in yz"
+# Choosing what planes to output
+################################
+REAL out2D_yzplane_x "x-coord for 2D planes in yz" STEERABLE = RECOVER
{
- *:* :: ""
-} 0.0
-
-CCTK_REAL out2D_xzplane_y "y-coord for 2D planes in xz"
+ *:* :: "A value between [xmin, xmax]"
+ -424242: :: "Default to IO::out_yzplane_x"
+} -424242
+REAL out2D_xzplane_y "y-coord for 2D planes in xz" STEERABLE = RECOVER
{
- *:* :: ""
-} 0.0
-
-CCTK_REAL out2D_xyplane_z "z-coord for 2D planes in xy"
+ *:* :: "A value between [ymin, ymax]"
+ -424242: :: "Default to IO::out_xzplane_y"
+} -424242
+REAL out2D_xyplane_z "z-coord for 2D planes in xy" STEERABLE = RECOVER
{
- *:* :: ""
-} 0.0
+ *:* :: "A value between [zmin, zmax]"
+ -424242: :: "Default to IO::out_xyplane_z"
+} -424242
-CCTK_INT out2D_xyplane_zi "z-index (from 0) for 2D planes in xy"
+INT out2D_yzplane_xi "x-index (from 0) for 2D planes in yz" STEERABLE = RECOVER
{
- 0:* :: ""
-} 0
-
-CCTK_INT out2D_xzplane_yi "y-index (from 0) for 2D planes in xz"
+ 0:* :: "An index between [0, nx)"
+ -1: :: "Choose the default from IO::out_yzplane_xi"
+} -1
+INT out2D_xzplane_yi "y-index (from 0) for 2D planes in xz" STEERABLE = RECOVER
{
- 0:* :: ""
-} 0
-
-CCTK_INT out2D_yzplane_xi "x-index (from 0) for 2D planes in yz"
+ 0:* :: "An index between [0, ny)"
+ -1: :: "Choose the default from IO::out_xzplane_yi"
+} -1
+INT out2D_xyplane_zi "z-index (from 0) for 2D planes in xy" STEERABLE = RECOVER
{
- 0:* :: ""
-} 0
-
+ 0:* :: "An index between [0, nz)"
+ -1: :: "Choose the default from IO::out_xyplane_zi"
+} -1
#############################################################################
@@ -211,46 +246,29 @@ CCTK_INT out2D_yzplane_xi "x-index (from 0) for 2D planes in yz"
#############################################################################
shares: IO
-####################
-# Output directories
-####################
-USES STRING outdir
-
-
-########################
-# How often to do output
-########################
+USES STRING out_dir
USES INT out_every
-
-
-#######################
-# What slices to output
-#######################
-USES CCTK_REAL out_xline_y
-USES CCTK_REAL out_xline_z
-USES CCTK_REAL out_yline_x
-USES CCTK_REAL out_yline_z
-USES CCTK_REAL out_zline_x
-USES CCTK_REAL out_zline_y
-USES CCTK_INT out_xline_yi
-USES CCTK_INT out_xline_zi
-USES CCTK_INT out_yline_xi
-USES CCTK_INT out_yline_zi
-USES CCTK_INT out_zline_xi
-USES CCTK_INT out_zline_yi
-USES CCTK_REAL out_yzplane_x
-USES CCTK_REAL out_xzplane_y
-USES CCTK_REAL out_xyplane_z
-USES CCTK_INT out_xyplane_zi
-USES CCTK_INT out_xzplane_yi
-USES CCTK_INT out_yzplane_xi
-
-
-
-# various things
-################
-USES KEYWORD newverbose
+USES REAL out_xline_y
+USES REAL out_xline_z
+USES REAL out_yline_x
+USES REAL out_yline_z
+USES REAL out_zline_x
+USES REAL out_zline_y
+USES INT out_xline_yi
+USES INT out_xline_zi
+USES INT out_yline_xi
+USES INT out_yline_zi
+USES INT out_zline_xi
+USES INT out_zline_yi
+USES REAL out_yzplane_x
+USES REAL out_xzplane_y
+USES REAL out_xyplane_z
+USES INT out_yzplane_xi
+USES INT out_xzplane_yi
+USES INT out_xyplane_zi
+USES KEYWORD verbose
USES BOOLEAN new_filename_scheme
+
EXTENDS KEYWORD out_fileinfo
{
"axis labels" :: "add axis labels information to output files"
diff --git a/schedule.ccl b/schedule.ccl
index c2f99f7..0830a8b 100644
--- a/schedule.ccl
+++ b/schedule.ccl
@@ -17,4 +17,4 @@ schedule IOASCII_Choose1D at BASEGRID after SpatialCoordinates
schedule IOASCII_Choose2D at BASEGRID after SpatialCoordinates
{
LANG:C
-} "Choose 2D output planes" \ No newline at end of file
+} "Choose 2D output planes"
diff --git a/src/ChooseOutput.c b/src/ChooseOutput.c
index 55fb071..42ad065 100644
--- a/src/ChooseOutput.c
+++ b/src/ChooseOutput.c
@@ -31,25 +31,10 @@ CCTK_FILEVERSION(CactusBase_IOASCII_ChooseOutput_c)
3. Coords from IOASCII
4. Coords from IOUtil
*/
-#define GET_SLICE(IOASCII_param, IOUtil_param, origin_index, origin_phys) \
+#define GET_SLICE(IOASCII_param, IOUtil_param, index, coord) \
{ \
- origin_index = -1; \
- if (CCTK_ParameterQueryTimesSet (#IOASCII_param "i", "IOASCII") > 0)\
- { \
- origin_index = IOASCII_param##i; \
- } \
- else if (CCTK_ParameterQueryTimesSet (#IOUtil_param "i", "IOUtil")>0)\
- { \
- origin_index = IOUtil_param##i; \
- } \
- else if (CCTK_ParameterQueryTimesSet (#IOASCII_param, "IOASCII") > 0)\
- { \
- origin_phys = IOASCII_param; \
- } \
- else \
- { \
- origin_phys = IOUtil_param; \
- } \
+ index = IOASCII_param##i >= 0 ? IOASCII_param##i : IOUtil_param##i; \
+ coord = IOASCII_param != -424242 ? IOASCII_param : IOUtil_param; \
}
@@ -68,11 +53,10 @@ void IOASCII_Choose2D (const cGH *GH);
Use parameters to choose the 1D slices through the output data.
@enddesc
- @calls CCTK_ParameterQueryTimesSet
- IOUtil_1DLines
+ @calls IOUtil_1DLines
@var GH
- @vdesc Pointer to CCTK grid hierarchy
+ @vdesc pointer to CCTK grid hierarchy
@vtype const cGH *
@vio in
@endvar
@@ -135,8 +119,7 @@ void IOASCII_Choose1D (const cGH *GH)
Use parameters to choose the 2D slices through the output data.
@enddesc
- @calls CCTK_ParameterQueryTimesSet
- IOUtil_2DPlanes
+ @calls IOUtil_2DPlanes
@var GH
@vdesc Pointer to CCTK grid hierarchy
diff --git a/src/Output1D.c b/src/Output1D.c
index 5b1a297..8bcdd3d 100644
--- a/src/Output1D.c
+++ b/src/Output1D.c
@@ -54,22 +54,17 @@ static void SetOutputFlag (int vindex, const char *optstring, void *arg);
int IOASCII_Output1DGH (const cGH *GH)
{
int vindex, retval;
- asciiioGH *myGH;
+ const asciiioGH *myGH;
- myGH = (asciiioGH *) CCTK_GHExtension (GH, "IOASCII");
+ retval = 0;
+ myGH = (const asciiioGH *) CCTK_GHExtension (GH, "IOASCII");
/* loop over all variables */
- for (vindex = retval = 0; vindex < CCTK_NumVars (); vindex++)
+ for (vindex = CCTK_NumVars () - 1; vindex >= 0; vindex--)
{
- /* check if this variable should be output */
- if (! IOASCII_TimeFor1D (GH, vindex))
- {
- continue;
- }
-
- /* do the output */
- if (IOASCII_Write1D (GH, vindex, CCTK_VarName (vindex)) == 0)
+ if (IOASCII_TimeFor1D (GH, vindex) &&
+ IOASCII_Write1D (GH, vindex, CCTK_VarName (vindex)) == 0)
{
/* register variable as having 1D output this iteration */
myGH->out1D_last[vindex] = GH->cctk_iteration;
@@ -160,19 +155,17 @@ int IOASCII_Output1DVarAs (const cGH *GH, const char *fullname, const char *alia
int IOASCII_TimeFor1D (const cGH *GH, int vindex)
{
int retval;
- asciiioGH *myGH;
char *fullname;
+ asciiioGH *myGH;
- /* default is not do any output */
- retval = 0;
-
myGH = (asciiioGH *) CCTK_GHExtension (GH, "IOASCII");
CheckSteerableParameters (myGH);
/* check if this variable should be output */
- if (myGH->out1D_every[vindex] > 0 &&
- GH->cctk_iteration % myGH->out1D_every[vindex] == 0)
+ retval = myGH->out1D_every[vindex] > 0 &&
+ GH->cctk_iteration % myGH->out1D_every[vindex] == 0;
+ if (retval)
{
/* check if this variable wasn't already output this iteration */
if (myGH->out1D_last[vindex] == GH->cctk_iteration)
@@ -182,10 +175,7 @@ int IOASCII_TimeFor1D (const cGH *GH, int vindex)
"Already done IOASCII 1D output for '%s' in current "
"iteration (probably via triggers)", fullname);
free (fullname);
- }
- else
- {
- retval = 1;
+ retval = 0;
}
}
@@ -251,7 +241,7 @@ static void CheckSteerableParameters (asciiioGH *myGH)
myGH->out1D_every_default = out1D_every >= 0 ? out1D_every : out_every;
/* report if frequency changed */
- if (myGH->out1D_every_default != i && ! CCTK_Equals (newverbose, "none"))
+ if (myGH->out1D_every_default != i && ! CCTK_Equals (verbose, "none"))
{
if (myGH->out1D_every_default > 0)
{
@@ -271,7 +261,7 @@ static void CheckSteerableParameters (asciiioGH *myGH)
memset (myGH->out1D_every, 0, num_vars * sizeof (int));
CCTK_TraverseString (out1D_vars, SetOutputFlag, myGH, CCTK_GROUP_OR_VAR);
- if (myGH->out1D_every_default == i || ! CCTK_Equals (newverbose, "none"))
+ if (myGH->out1D_every_default == i || ! CCTK_Equals (verbose, "none"))
{
msg = NULL;
for (i = 0; i < num_vars; i++)
diff --git a/src/Output2D.c b/src/Output2D.c
index f62a635..80788a7 100644
--- a/src/Output2D.c
+++ b/src/Output2D.c
@@ -40,7 +40,7 @@ static void SetOutputFlag (int vindex, const char *optstring, void *arg);
IOASCII_Write2D
@var GH
- @vdesc Pointer to CCTK GH
+ @vdesc pointer to CCTK GH
@vtype const cGH *
@vio in
@endvar
@@ -54,22 +54,17 @@ static void SetOutputFlag (int vindex, const char *optstring, void *arg);
int IOASCII_Output2DGH (const cGH *GH)
{
int vindex, retval;
- asciiioGH *myGH;
+ const asciiioGH *myGH;
- myGH = (asciiioGH *) CCTK_GHExtension (GH, "IOASCII");
+ retval = 0;
+ myGH = (const asciiioGH *) CCTK_GHExtension (GH, "IOASCII");
/* loop over all variables */
- for (vindex = retval = 0; vindex < CCTK_NumVars (); vindex++)
+ for (vindex = CCTK_NumVars () - 1; vindex >= 0; vindex--)
{
- /* check if this variable should be output */
- if (! IOASCII_TimeFor2D (GH, vindex))
- {
- continue;
- }
-
- /* do the output */
- if (IOASCII_Write2D (GH, vindex, CCTK_VarName (vindex)) == 0)
+ if (IOASCII_TimeFor2D (GH, vindex) &&
+ IOASCII_Write2D (GH, vindex, CCTK_VarName (vindex)) == 0)
{
/* register variable as having 2D output this iteration */
myGH->out2D_last[vindex] = GH->cctk_iteration;
@@ -92,7 +87,7 @@ int IOASCII_Output2DGH (const cGH *GH)
@calls IOASCII_Write2D
@var GH
- @vdesc Pointer to CCTK GH
+ @vdesc pointer to CCTK GH
@vtype const cGH *
@vio in
@endvar
@@ -140,7 +135,7 @@ int IOASCII_Output2DVarAs (const cGH *GH, const char *fullname, const char *alia
@enddesc
@var GH
- @vdesc Pointer to CCTK GH
+ @vdesc pointer to CCTK GH
@vtype const cGH *
@vio in
@endvar
@@ -159,19 +154,17 @@ int IOASCII_Output2DVarAs (const cGH *GH, const char *fullname, const char *alia
int IOASCII_TimeFor2D (const cGH *GH, int vindex)
{
int retval;
- asciiioGH *myGH;
char *fullname;
+ asciiioGH *myGH;
- /* default is not do any output */
- retval = 0;
-
myGH = (asciiioGH *) CCTK_GHExtension (GH, "IOASCII");
CheckSteerableParameters (myGH);
/* check if this variable should be output */
- if (myGH->out2D_every[vindex] > 0 &&
- GH->cctk_iteration % myGH->out2D_every[vindex] == 0)
+ retval = myGH->out2D_every[vindex] > 0 &&
+ GH->cctk_iteration % myGH->out2D_every[vindex] == 0;
+ if (retval)
{
/* check if variable wasn't already output this iteration */
if (myGH->out2D_last[vindex] == GH->cctk_iteration)
@@ -181,10 +174,7 @@ int IOASCII_TimeFor2D (const cGH *GH, int vindex)
"Already done IOASCII 2D output for '%s' in current "
"iteration (probably via triggers)", fullname);
free (fullname);
- }
- else
- {
- retval = 1;
+ retval = 0;
}
}
@@ -203,7 +193,7 @@ int IOASCII_TimeFor2D (const cGH *GH, int vindex)
@calls IOASCII_Write2D
@var GH
- @vdesc Pointer to CCTK GH
+ @vdesc pointer to CCTK GH
@vtype const cGH *
@vio in
@endvar
@@ -251,7 +241,7 @@ static void CheckSteerableParameters (asciiioGH *myGH)
myGH->out2D_every_default = out2D_every >= 0 ? out2D_every : out_every;
/* report if frequency changed */
- if (myGH->out2D_every_default != i && ! CCTK_Equals (newverbose, "none"))
+ if (myGH->out2D_every_default != i && ! CCTK_Equals (verbose, "none"))
{
if (myGH->out2D_every_default > 0)
{
@@ -271,7 +261,7 @@ static void CheckSteerableParameters (asciiioGH *myGH)
memset (myGH->out2D_every, 0, num_vars * sizeof (int));
CCTK_TraverseString (out2D_vars, SetOutputFlag, myGH, CCTK_GROUP_OR_VAR);
- if (myGH->out2D_every_default == i || ! CCTK_Equals (newverbose, "none"))
+ if (myGH->out2D_every_default == i || ! CCTK_Equals (verbose, "none"))
{
msg = NULL;
for (i = 0; i < num_vars; i++)
diff --git a/src/Output3D.c b/src/Output3D.c
index c2f8dc4..4cf537f 100644
--- a/src/Output3D.c
+++ b/src/Output3D.c
@@ -40,7 +40,7 @@ static void SetOutputFlag (int vindex, const char *optstring, void *arg);
IOASCII_Write3D
@var GH
- @vdesc Pointer to CCTK GH
+ @vdesc pointer to CCTK GH
@vtype const cGH *
@vio in
@endvar
@@ -54,22 +54,17 @@ static void SetOutputFlag (int vindex, const char *optstring, void *arg);
int IOASCII_Output3DGH (const cGH *GH)
{
int vindex, retval;
- asciiioGH *myGH;
+ const asciiioGH *myGH;
- myGH = (asciiioGH *) CCTK_GHExtension (GH, "IOASCII");
+ retval = 0;
+ myGH = (const asciiioGH *) CCTK_GHExtension (GH, "IOASCII");
/* loop over all variables */
- for (vindex = retval = 0; vindex < CCTK_NumVars (); vindex++)
+ for (vindex = CCTK_NumVars () - 1; vindex >= 0; vindex--)
{
- /* check if this variable should be output */
- if (! IOASCII_TimeFor3D (GH, vindex))
- {
- continue;
- }
-
- /* do the output */
- if (IOASCII_Write3D (GH, vindex, CCTK_VarName (vindex)) == 0)
+ if (IOASCII_TimeFor3D (GH, vindex) &&
+ IOASCII_Write3D (GH, vindex, CCTK_VarName (vindex)) == 0)
{
/* register variable as having 3D output this iteration */
myGH->out3D_last[vindex] = GH->cctk_iteration;
@@ -92,7 +87,7 @@ int IOASCII_Output3DGH (const cGH *GH)
@calls IOASCII_Write3D
@var GH
- @vdesc Pointer to CCTK GH
+ @vdesc pointer to CCTK GH
@vtype const cGH *
@vio in
@endvar
@@ -141,7 +136,7 @@ int IOASCII_Output3DVarAs (const cGH *GH, const char *fullname, const char *alia
@enddesc
@var GH
- @vdesc Pointer to CCTK GH
+ @vdesc pointer to CCTK GH
@vtype const cGH *
@vio in
@endvar
@@ -160,19 +155,17 @@ int IOASCII_Output3DVarAs (const cGH *GH, const char *fullname, const char *alia
int IOASCII_TimeFor3D (const cGH *GH, int vindex)
{
int retval;
- asciiioGH *myGH;
char *fullname;
+ asciiioGH *myGH;
- /* default is not do any output */
- retval = 0;
-
myGH = (asciiioGH *) CCTK_GHExtension (GH, "IOASCII");
CheckSteerableParameters (myGH);
/* check if this variable should be output */
- if (myGH->out3D_every[vindex] > 0 &&
- GH->cctk_iteration % myGH->out3D_every[vindex] == 0)
+ retval = myGH->out3D_every[vindex] > 0 &&
+ GH->cctk_iteration % myGH->out3D_every[vindex] == 0;
+ if (retval)
{
/* check if variable wasn't already output this iteration */
if (myGH->out3D_last[vindex] == GH->cctk_iteration)
@@ -182,10 +175,7 @@ int IOASCII_TimeFor3D (const cGH *GH, int vindex)
"Already done IOASCII 3D output for '%s' in current "
"iteration (probably via triggers)", fullname);
free (fullname);
- }
- else
- {
- retval = 1;
+ retval = 0;
}
}
@@ -204,7 +194,7 @@ int IOASCII_TimeFor3D (const cGH *GH, int vindex)
@calls IOASCII_Write3D
@var GH
- @vdesc Pointer to CCTK GH
+ @vdesc pointer to CCTK GH
@vtype const cGH *
@vio in
@endvar
@@ -252,7 +242,7 @@ static void CheckSteerableParameters (asciiioGH *myGH)
myGH->out3D_every_default = out3D_every >= 0 ? out3D_every : out_every;
/* report if frequency changed */
- if (myGH->out3D_every_default != i && ! CCTK_Equals (newverbose, "none"))
+ if (myGH->out3D_every_default != i && ! CCTK_Equals (verbose, "none"))
{
if (myGH->out3D_every_default > 0)
{
@@ -272,7 +262,7 @@ static void CheckSteerableParameters (asciiioGH *myGH)
memset (myGH->out3D_every, 0, num_vars * sizeof (int));
CCTK_TraverseString (out3D_vars, SetOutputFlag, myGH, CCTK_GROUP_OR_VAR);
- if (myGH->out3D_every_default == i || ! CCTK_Equals (newverbose, "none"))
+ if (myGH->out3D_every_default == i || ! CCTK_Equals (verbose, "none"))
{
msg = NULL;
for (i = 0; i < num_vars; i++)
diff --git a/src/Startup.c b/src/Startup.c
index eb24978..bee548b 100644
--- a/src/Startup.c
+++ b/src/Startup.c
@@ -26,12 +26,12 @@ CCTK_FILEVERSION(CactusBase_IOASCII_Startup_c)
/********************************************************************
******************** Macro Definitions ************************
********************************************************************/
-#define CREATE_OUTDIR(dir) \
+#define CREATE_OUTDIR(method, dir) \
{ \
- /* check whether "dir" was set; if not default to "IO::outdir" */ \
+ /* check whether "dir" was set; if not default to "IO::out_dir" */ \
if (*dir == 0) \
{ \
- dir = outdir; \
+ dir = out_dir; \
} \
\
/* omit the directory name if it's the current working dir */ \
@@ -50,13 +50,13 @@ CCTK_FILEVERSION(CactusBase_IOASCII_Startup_c)
if (i < 0) \
{ \
CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, \
- "IOASCII_SetupGH: Problem creating IOASCII output " \
- "directory '%s'", myGH->dir); \
+ "IOASCII_SetupGH: Problem creating %s output " \
+ "directory '%s'", method, myGH->dir); \
} \
- else if (i >= 0 && CCTK_Equals (newverbose, "full")) \
+ else if (i >= 0 && CCTK_Equals (verbose, "full")) \
{ \
- CCTK_VInfo (CCTK_THORNSTRING, "IOASCII_1D: Output to directory " \
- "'%s'", myGH->dir); \
+ CCTK_VInfo (CCTK_THORNSTRING, "%s: Output to directory '%s'", \
+ method, myGH->dir); \
} \
}
@@ -168,7 +168,7 @@ static void *IOASCII_SetupGH (tFleshConfig *config, int conv_level, cGH *GH)
CCTK_RegisterIOMethodTimeToOutput (i, IOASCII_TimeFor3D);
CCTK_RegisterIOMethodTriggerOutput (i, IOASCII_TriggerOutput3D);
- if (! CCTK_Equals (newverbose, "none"))
+ if (! CCTK_Equals (verbose, "none"))
{
CCTK_INFO ("I/O Method 'IOASCII_1D' registered");
CCTK_INFO ("IOASCII_1D: Output of 1D lines of grid functions/arrays "
@@ -207,9 +207,9 @@ static void *IOASCII_SetupGH (tFleshConfig *config, int conv_level, cGH *GH)
myGH->fileList_3D = NULL;
/* make sure all output directories exist */
- CREATE_OUTDIR (outdir1D);
- CREATE_OUTDIR (outdir2D);
- CREATE_OUTDIR (outdir3D);
+ CREATE_OUTDIR ("IOASCII_1D", out1D_dir);
+ CREATE_OUTDIR ("IOASCII_2D", out2D_dir);
+ CREATE_OUTDIR ("IOASCII_3D", out3D_dir);
return (myGH);
}
diff --git a/src/Write1D.c b/src/Write1D.c
index 303ea2b..60ab901 100644
--- a/src/Write1D.c
+++ b/src/Write1D.c
@@ -211,24 +211,6 @@ int IOASCII_Write1D (const cGH *GH, int vindex, const char *alias)
}
}
- /* DEPRICATED IN BETA12 */
- if (CCTK_ParameterQueryTimesSet ("out_style", CCTK_THORNSTRING) > 0)
- {
- static int user_was_warned = 0;
-
-
- if (! user_was_warned)
- {
- CCTK_WARN (1, "IOASCII_Write1D: parameter 'IOASCII::out_style' is "
- "deprecated in BETA12, please use 'IOASCII::out1D_style' "
- "instead");
- user_was_warned = 1;
- }
-
- out1D_style = CCTK_Equals (out_style, "gnuplot") ?
- "gnuplot f(x)" : "xgraph";
- }
-
/* set header format string */
if (CCTK_Equals (out1D_style, "xgraph"))
{
@@ -505,7 +487,7 @@ static void OpenFile (const cGH *GH,
/* 20 extra characters should be enough for '/',
the type extension, the file extension, and the trailing '\0' */
- filename = (char *) malloc (strlen (myGH->outdir1D) + strlen (alias) +
+ filename = (char *) malloc (strlen (myGH->out1D_dir) + strlen (alias) +
sizeof (slicename) + 20);
for (i = 0; i < num_files; i++)
@@ -572,12 +554,12 @@ static void OpenFile (const cGH *GH,
sprintf (slicename, "%s%dD_diagonal", type_extension, gdata->dim);
}
- sprintf (filename, "%s%s_%s%s", myGH->outdir1D, alias, slicename,
+ sprintf (filename, "%s%s_%s%s", myGH->out1D_dir, alias, slicename,
file_extension);
}
else
{
- sprintf (filename, "%s%s%s.%s", myGH->outdir1D, alias, type_extension,
+ sprintf (filename, "%s%s%s.%s", myGH->out1D_dir, alias, type_extension,
extensions[dir]);
}
diff --git a/src/Write2D.c b/src/Write2D.c
index a60dc1c..a3f31e2 100644
--- a/src/Write2D.c
+++ b/src/Write2D.c
@@ -396,7 +396,7 @@ static FILE **OpenFile (const cGH *GH,
sprintf (zlabel_fmt_string, " (%%c = %%%s),", out_format);
fileset = (FILE **) malloc (3 * sizeof (FILE *));
- filename = (char *) malloc (strlen (myGH->outdir2D) + strlen (alias) +
+ filename = (char *) malloc (strlen (myGH->out2D_dir) + strlen (alias) +
sizeof (slicename) + 20);
/* open/create files for each slice */
@@ -415,17 +415,17 @@ static FILE **OpenFile (const cGH *GH,
myGH->sp2xyz[dim - 1][dir]);
}
- sprintf (filename, "%s/%s_%s.asc", myGH->outdir2D, alias, slicename);
+ sprintf (filename, "%s/%s_%s.asc", myGH->out2D_dir, alias, slicename);
}
else
{
if (dim == 2)
{
- sprintf (filename, "%s%s_2D.gnuplot", myGH->outdir2D, alias);
+ sprintf (filename, "%s%s_2D.gnuplot", myGH->out2D_dir, alias);
}
else
{
- sprintf (filename, "%s%s_2d_%s.gnuplot", myGH->outdir2D, alias,
+ sprintf (filename, "%s%s_2d_%s.gnuplot", myGH->out2D_dir, alias,
extensions[dir]);
}
}
diff --git a/src/Write3D.c b/src/Write3D.c
index cc3bf6b..1c1e650 100644
--- a/src/Write3D.c
+++ b/src/Write3D.c
@@ -341,10 +341,10 @@ static FILE *OpenFile (const cGH *GH, const char *fullname, const char *alias)
}
file = (FILE **) malloc (sizeof (FILE *));
- filename = (char *) malloc (strlen (myGH->outdir3D) + strlen (alias) + 9);
+ filename = (char *) malloc (strlen (myGH->out3D_dir) + strlen (alias) + 9);
/* open/create the file */
- sprintf (filename, "%s%s_3D.asc", myGH->outdir3D, alias);
+ sprintf (filename, "%s%s_3D.asc", myGH->out3D_dir, alias);
/* if restart from recovery, try to open an existing file ... */
*file = fopen (filename, ioUtilGH->recovered ? "a" : "w");
diff --git a/src/ioASCIIGH.h b/src/ioASCIIGH.h
index 6a60458..74bb44f 100644
--- a/src/ioASCIIGH.h
+++ b/src/ioASCIIGH.h
@@ -29,7 +29,7 @@ typedef struct IOASCIIGH
char *out1D_vars, *out2D_vars, *out3D_vars;
/* directories in which to output */
- char *outdir1D, *outdir2D, *outdir3D;
+ char *out1D_dir, *out2D_dir, *out3D_dir;
/* the last iteration output for var [i] */
int *out1D_last, *out2D_last, *out3D_last;