aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortradke <tradke@0888f3d4-9f52-45d2-93bc-d00801ff5e46>2002-03-14 13:15:39 +0000
committertradke <tradke@0888f3d4-9f52-45d2-93bc-d00801ff5e46>2002-03-14 13:15:39 +0000
commit593faf37a6a9e268e9cfeff6d8e58fb5151c8347 (patch)
tree11b9ebcdc1d0a0bb83deb3009bb6b101b376a4ed /src
parent3afd79ee939f7451a6beca3e484065c45fc42536 (diff)
Added new parameter 'IOStreamedHDF5::out_every' which just depricates
the old parameter 'IOStreamedHDF5::outHDF5_every'. This is to get a consistent set of I/O parameter names for all I/O thorns. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOStreamedHDF5/trunk@79 0888f3d4-9f52-45d2-93bc-d00801ff5e46
Diffstat (limited to 'src')
-rw-r--r--src/Output.c34
1 files changed, 29 insertions, 5 deletions
diff --git a/src/Output.c b/src/Output.c
index 075ab8b..1942a77 100644
--- a/src/Output.c
+++ b/src/Output.c
@@ -305,16 +305,40 @@ int IOStreamedHDF5_TriggerOutput (const cGH *GH,
@@*/
static void CheckSteerableParameters (ioStreamedHDF5GH *myGH)
{
- int times_set;
- static int out_vars_lastset = -1;
+ int type, times_set;
+ static int out_vars_lastset = -1, user_was_warned = 0;
DECLARE_CCTK_PARAMETERS
/* How often to output */
- myGH->out_every = out_every > 0 ? out_every : -1;
- if (outHDF5_every > 0)
+ if (out_every > 0 || outHDF5_every > 0)
{
- myGH->out_every = outHDF5_every;
+ if (out_every <= 0)
+ {
+ if (! user_was_warned)
+ {
+ CCTK_WARN (1, "Parameter 'IOStreamedHDF5::outHDF5_every is depricated "
+ "in BETA12, please use 'IOStreamedHDF5::out_every' "
+ "instead");
+ user_was_warned = 1;
+ }
+ myGH->out_every = outHDF5_every;
+ }
+ else
+ {
+ myGH->out_every = out_every;
+ }
+ }
+ else
+ {
+ myGH->out_every = *(const CCTK_INT *)
+ CCTK_ParameterGet ("out_every",
+ CCTK_ImplementationThorn ("IO"),
+ &type);
+ if (myGH->out_every == 0)
+ {
+ myGH->out_every = -1;
+ }
}
/* re-parse the 'IOStreamedHDF5::out_vars' parameter if it was changed */