aboutsummaryrefslogtreecommitdiff
path: root/src/Output2D.c
diff options
context:
space:
mode:
authortradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>2002-04-19 08:31:59 +0000
committertradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>2002-04-19 08:31:59 +0000
commita906f1d936902e6c9a63ab05e2528981270746c6 (patch)
tree77f8738da67ef586969330e2e9c3886f232cfe63 /src/Output2D.c
parent9db75f40285a7d32fced11f1f5c0806e16524f8c (diff)
Bugfix in parameter evaluation: if IOFlexIO::out*_every was set to 0 it would
default to IO::out_every (instead of disabling FlexIO output). git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@234 ebee0441-1374-4afa-a3b5-247f3ba15b9a
Diffstat (limited to 'src/Output2D.c')
-rw-r--r--src/Output2D.c84
1 files changed, 41 insertions, 43 deletions
diff --git a/src/Output2D.c b/src/Output2D.c
index a6d2dde..14d86e7 100644
--- a/src/Output2D.c
+++ b/src/Output2D.c
@@ -2,9 +2,9 @@
@file Output2D.c
@date Tue Jan 9 1999
@author Gabrielle Allen
- @desc
+ @desc
Functions to deal 2D output of GFs
- @enddesc
+ @enddesc
@history
@hauthor Thomas Radke @hdate 16 Mar 1999
@hdesc Converted to Cactus 4.0
@@ -33,19 +33,19 @@ static void SetOutputFlag (int vindex, const char *optstring, void *arg);
@routine IOFlexIO_Output2DGH
@date Sat March 6 1999
@author Gabrielle Allen
- @desc
+ @desc
Loops over all variables and outputs them if necessary
- @enddesc
+ @enddesc
@calledby CCTK_OutputGH ("IOFlexIO_2D")
- @history
-
- @endhistory
+ @history
+
+ @endhistory
@var GH
@vdesc Pointer to CCTK GH
@vtype const cGH *
@vio in
- @vcomment
- @endvar
+ @vcomment
+ @endvar
@@*/
int IOFlexIO_Output2DGH (const cGH *GH)
@@ -96,31 +96,31 @@ int IOFlexIO_Output2DGH (const cGH *GH)
@routine IOFlexIO_Output2DVarAs
@date Sat March 6 1999
@author Gabrielle Allen
- @desc
+ @desc
unconditional output of a variable using the IO 2D output method
- @enddesc
+ @enddesc
@calledby IOFlexIO_Output2DGH, CCTK_OutputVarAsByMethod ("IOFlexIO_2D")
- @history
-
- @endhistory
+ @history
+
+ @endhistory
@var GH
@vdesc Pointer to CCTK GH
@vtype const cGH *
@vio in
- @vcomment
- @endvar
+ @vcomment
+ @endvar
@var fullname
@vdesc complete name of variable to output
@vtype const char *
@vio in
- @vcomment
- @endvar
+ @vcomment
+ @endvar
@var alias
@vdesc alias name of variable to output (used to generate output filename)
@vtype const char *
@vio in
- @vcomment
- @endvar
+ @vcomment
+ @endvar
@@*/
int IOFlexIO_Output2DVarAs (const cGH *GH, const char *fullname, const char *alias)
{
@@ -149,26 +149,26 @@ int IOFlexIO_Output2DVarAs (const cGH *GH, const char *fullname, const char *ali
@routine IOFlexIO_TimeFor2D
@date Sat March 6 1999
@author Gabrielle Allen
- @desc
+ @desc
Decides if it is time to output a variable using the IO 2D output
method
- @enddesc
+ @enddesc
@calledby IOFlexIO_Output2DGH
- @history
-
- @endhistory
+ @history
+
+ @endhistory
@var GH
@vdesc Pointer to CCTK GH
@vtype const cGH *
@vio in
- @vcomment
- @endvar
+ @vcomment
+ @endvar
@var vindex
@vdesc index of variable
@vtype int
@vio in
- @vcomment
- @endvar
+ @vcomment
+ @endvar
@@*/
int IOFlexIO_TimeFor2D (const cGH *GH, int vindex)
{
@@ -210,26 +210,26 @@ int IOFlexIO_TimeFor2D (const cGH *GH, int vindex)
@routine IOFlexIO_TriggerOutput2D
@date Sat March 6 1999
@author Gabrielle Allen
- @desc
+ @desc
Triggers the output a variable using the IO 2D output
method
- @enddesc
+ @enddesc
@calledby CCTK scheduler
- @history
-
- @endhistory
+ @history
+
+ @endhistory
@var GH
@vdesc Pointer to CCTK GH
@vtype const cGH *
@vio in
- @vcomment
- @endvar
+ @vcomment
+ @endvar
@var vindex
@vdesc index of variable to output
@vtype int
@vio in
- @vcomment
- @endvar
+ @vcomment
+ @endvar
@@*/
int IOFlexIO_TriggerOutput2D (const cGH *GH, int vindex)
{
@@ -265,19 +265,17 @@ int IOFlexIO_TriggerOutput2D (const cGH *GH, int vindex)
/* check if steerable parameters have changed */
static void CheckSteerableParameters (flexioGH *myGH)
{
- DECLARE_CCTK_PARAMETERS
int times_set;
static int out2D_vars_lastset = -1;
+ DECLARE_CCTK_PARAMETERS
/* How often to output */
- myGH->out2D_every = out_every > 0 ? out_every : -1;
- if (out2D_every > 0)
- myGH->out2D_every = out2D_every;
+ myGH->out2D_every = out2D_every >= 0 ? out2D_every : out_every;
/* re-parse the 'out2D_vars' parameter if it was changed */
times_set = CCTK_ParameterQueryTimesSet ("out2D_vars", CCTK_THORNSTRING);
- if (times_set != out2D_vars_lastset)
+ if (times_set != out2D_vars_lastset)
{
memset (myGH->do_out2D, 0, CCTK_NumVars ());
CCTK_TraverseString (out2D_vars, SetOutputFlag, myGH->do_out2D,