aboutsummaryrefslogtreecommitdiff
path: root/src/OutputInfo.c
diff options
context:
space:
mode:
authortradke <tradke@b589c3ab-70e8-4b4d-a09f-cba2dd200880>2000-09-18 20:06:56 +0000
committertradke <tradke@b589c3ab-70e8-4b4d-a09f-cba2dd200880>2000-09-18 20:06:56 +0000
commite8f24ec4a38e4056962229c37ed2e4ed8cbbc611 (patch)
tree3039ac406c8011a9679d715fdf357ff603ce65ee /src/OutputInfo.c
parent89da3588c8551a9d41a73e8fedaf98a2fd1d8b2e (diff)
Give a more explanatory warning message if output for a given variable
was already done. Increased warning level to 5. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOBasic/trunk@66 b589c3ab-70e8-4b4d-a09f-cba2dd200880
Diffstat (limited to 'src/OutputInfo.c')
-rw-r--r--src/OutputInfo.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/src/OutputInfo.c b/src/OutputInfo.c
index eaf3bf1..c7b79a5 100644
--- a/src/OutputInfo.c
+++ b/src/OutputInfo.c
@@ -23,7 +23,9 @@
/* the number at which to switch from decimal to exp notation */
#define DECIMAL_PRECISION 1.0e-8
#define DECIMAL_TOOBIG 1.0e+8
-#define USE_DECIMAL_NOTATION(x) ((fabs (x) > DECIMAL_PRECISION) || ((x) == 0.0) || (fabs(x) < DECIMAL_TOOBIG))
+#define USE_DECIMAL_NOTATION(x) ((fabs (x) > DECIMAL_PRECISION) || \
+ ((x) == 0.0) || \
+ (fabs(x) < DECIMAL_TOOBIG))
/* static variables */
static int print_header = 0;
@@ -98,11 +100,15 @@ int IOBasic_OutputInfoGH (cGH *GH)
do_outInfo = 0;
for (i = 0; i < CCTK_NumVars (); i++)
+ {
do_outInfo |= myGH->do_outInfo[i];
+ }
/* suppress any output if there are no variables to output */
if (! do_outInfo)
+ {
return (0);
+ }
print_header = 1;
}
@@ -254,7 +260,6 @@ int IOBasic_OutputInfoGH (cGH *GH)
@vcomment
@endvar
@@*/
-
int IOBasic_TimeForInfo (cGH *GH, int index)
{
DECLARE_CCTK_PARAMETERS
@@ -272,11 +277,15 @@ int IOBasic_TimeForInfo (cGH *GH, int index)
/* How often to output */
myGH->outInfo_every = out_every > 0 ? out_every : -1;
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);
@@ -305,9 +314,19 @@ int IOBasic_TimeForInfo (cGH *GH, int index)
/* Check GF not already output this iteration */
if (myGH->outInfo_last[index] == GH->cctk_iteration)
- CCTK_WARN (2, "Already done info output in IO");
+ {
+ char *fullname = CCTK_FullName (index);
+
+
+ CCTK_VWarn (5, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "Already done Info output for variable '%s' in current "
+ "iteration (probably via triggers)", fullname);
+ free (fullname);
+ }
else
- retval = 1;
+ {
+ return_type = 1;
+ }
}
return retval;