From 9e897d77648b19c5f0cb2146d96d8c1e663d557e Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 27 May 2002 08:17:03 +0000 Subject: Make use of Tom's extensions to parameter declarations: USE some_parameter AS alias. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOPanda/trunk@37 38c3d835-c875-442e-b0fe-21c19ce1d001 --- param.ccl | 4 ++-- src/Output.c | 8 +------- src/Startup.c | 4 +--- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/param.ccl b/param.ccl index a6931a6..c59ddf9 100644 --- a/param.ccl +++ b/param.ccl @@ -44,8 +44,8 @@ STRING out_vars "Variables to output in IOPanda file format" STEERABLE = ALWAYS ############################################################################# shares: IO -# FIXME: want USES STRING out_dir AS default_out_dir -# FIXME: want USES INT out_every AS default_out_every +USES STRING out_dir AS io_out_dir +USES INT out_every AS io_out_every USES KEYWORD verbose USES BOOLEAN out_fileinfo USES KEYWORD out_mode diff --git a/src/Output.c b/src/Output.c index bc37807..449d43b 100644 --- a/src/Output.c +++ b/src/Output.c @@ -304,13 +304,7 @@ static void CheckSteerableParameters (const cGH *GH) /* how often to output */ myGH = (pandaGH *) CCTK_GHExtension (GH, "IOPanda"); - myGH->out_every = out_every; - if (myGH->out_every < 0) - { - myGH->out_every = *(const CCTK_INT *) - CCTK_ParameterGet ("out_every", - CCTK_ImplementationThorn ("IO"), NULL); - } + myGH->out_every = out_every >= 0 ? out_every : io_out_every; /* re-parse the 'out_vars' parameter if it was changed */ times_set = CCTK_ParameterQueryTimesSet ("out_vars", CCTK_THORNSTRING); diff --git a/src/Startup.c b/src/Startup.c index 26b5c8d..61fe3d3 100644 --- a/src/Startup.c +++ b/src/Startup.c @@ -156,9 +156,7 @@ static void *SetupGH (tFleshConfig *config, int convergence_level, cGH *GH) /* get the name of IOPanda's output directory */ if (*out_dir == 0) { - out_dir = *(const char **) - CCTK_ParameterGet ("out_dir", CCTK_ImplementationThorn ("IO"), - NULL); + out_dir = io_out_dir; } /* skip the directory pathname if output goes into current directory */ -- cgit v1.2.3