diff options
author | tradke <tradke@b589c3ab-70e8-4b4d-a09f-cba2dd200880> | 2000-03-06 17:47:12 +0000 |
---|---|---|
committer | tradke <tradke@b589c3ab-70e8-4b4d-a09f-cba2dd200880> | 2000-03-06 17:47:12 +0000 |
commit | 2ea6ecba66422a4fd8562a71127ab80978e9d613 (patch) | |
tree | c733032a602bbd282e88ff13466d9a57685ac3b5 /src | |
parent | d8277e5fe0bbfbdd1b8bfc03143ed2b34b7dcd01 (diff) |
CactusBase/252 fixed where the info header was missing for triggered output.
Also forgot to check outXXX_every parameter for triggered output.
Thomas
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOBasic/trunk@41 b589c3ab-70e8-4b4d-a09f-cba2dd200880
Diffstat (limited to 'src')
-rw-r--r-- | src/Output.c | 4 | ||||
-rw-r--r-- | src/OutputInfo.c | 19 |
2 files changed, 21 insertions, 2 deletions
diff --git a/src/Output.c b/src/Output.c index 12bfc9f..074dd0a 100644 --- a/src/Output.c +++ b/src/Output.c @@ -185,6 +185,10 @@ int IOBasic_TimeForOutput (cGH *GH, int index) CheckSteerableParameters (myGH); + /* check if any output was requested */ + if (myGH->outScalar_every <= 0) + return (0); + grouptype = CCTK_GroupTypeFromVarI (index); /* Check this GF should be output */ diff --git a/src/OutputInfo.c b/src/OutputInfo.c index bff52dd..bb63893 100644 --- a/src/OutputInfo.c +++ b/src/OutputInfo.c @@ -29,7 +29,8 @@ CCTK_REAL IOBasic_WriteInfo (cGH *GH, int index, const char *operator, #define USE_DECIMAL_NOTATION(x) ((fabs (x) > DECIMAL_PRECISION) || ((x) == 0.0)) /* static variables */ -static int outInfo_vars_lastset = 0; +static int print_header = 0; +static int outInfo_vars_lastset = 0; /*@@ @@ -89,7 +90,6 @@ int IOBasic_OutputInfoGH (cGH *GH) if (paramdata->n_set != outInfo_vars_lastset) { int do_outInfo; - char l1[1024],l2[1024],l3[1024]; ParseVarsForOutput (outInfo_vars, myGH->do_outInfo); @@ -104,6 +104,15 @@ int IOBasic_OutputInfoGH (cGH *GH) if (! do_outInfo) return (0); + print_header = 1; + } + + if (print_header) + { + char l1[1024],l2[1024],l3[1024]; + + print_header = 0; + sprintf (l1," it | |"); sprintf (l2," | t |"); sprintf (l3,"----------------"); @@ -245,6 +254,10 @@ int IOBasic_TimeForInfo (cGH *GH, int var) if (outInfo_every > 0) myGH->outInfo_every = outInfo_every; + /* return if no output requested */ + if (myGH->outInfo_every <= 0) + return (0); + /* Check the 'outInfo_vars' parameter */ paramdata = CCTK_ParameterData ("outInfo_vars", CCTK_THORNSTRING); if (! paramdata) @@ -261,6 +274,8 @@ int IOBasic_TimeForInfo (cGH *GH, int var) /* Save the last setting of 'outInfo_vars' parameter */ outInfo_vars_lastset = paramdata->n_set; + + print_header = 1; } /* Check this GF should be output */ |