diff options
author | tradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a> | 2002-05-27 08:16:59 +0000 |
---|---|---|
committer | tradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a> | 2002-05-27 08:16:59 +0000 |
commit | cb9c627a662b3f77d9dbc61a413165f67ac8ec13 (patch) | |
tree | b36ce56ba40963580155444ecc1185e55e99a895 /src | |
parent | c4403291c3f72c1fe985aa16b6d8533e1ac5661d (diff) |
Make use of Tom's extensions to parameter declarations:
USE some_parameter AS alias.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@248 ebee0441-1374-4afa-a3b5-247f3ba15b9a
Diffstat (limited to 'src')
-rw-r--r-- | src/Output.c | 7 | ||||
-rw-r--r-- | src/Output2D.c | 7 | ||||
-rw-r--r-- | src/Startup.c | 8 |
3 files changed, 4 insertions, 18 deletions
diff --git a/src/Output.c b/src/Output.c index 812149f..e74949d 100644 --- a/src/Output.c +++ b/src/Output.c @@ -291,12 +291,7 @@ static void CheckSteerableParameters (const cGH *GH) /* how often to output */ myGH = (flexioGH *) CCTK_GHExtension (GH, "IOFlexIO"); i = myGH->out_every_default; - myGH->out_every_default = out_every; - if (myGH->out_every_default < 0) - { - myGH->out_every_default = *(const CCTK_INT *) - CCTK_ParameterGet ("out_every", CCTK_ImplementationThorn ("IO"), NULL); - } + myGH->out_every_default = out_every >= 0 ? out_every : io_out_every; /* report if frequency changed */ if (myGH->out_every_default != i && ! CCTK_Equals (verbose, "none")) diff --git a/src/Output2D.c b/src/Output2D.c index 7da9ac2..4aba537 100644 --- a/src/Output2D.c +++ b/src/Output2D.c @@ -251,12 +251,7 @@ static void CheckSteerableParameters (flexioGH *myGH) /* how often to output */ i = myGH->out2D_every_default; - myGH->out2D_every_default = out2D_every; - if (myGH->out2D_every_default < 0) - { - myGH->out2D_every_default = *(const CCTK_INT *) - CCTK_ParameterGet ("out_every", CCTK_ImplementationThorn ("IO"), NULL); - } + myGH->out2D_every_default = out2D_every >= 0 ? out2D_every : io_out_every; /* report if frequency changed */ if (myGH->out2D_every_default != i && ! CCTK_Equals (verbose, "none")) diff --git a/src/Startup.c b/src/Startup.c index e75b1d4..edcfc1f 100644 --- a/src/Startup.c +++ b/src/Startup.c @@ -208,7 +208,6 @@ static void *SetupGH (tFleshConfig *config, int conv_level, cGH *GH) int i, numvars; flexioGH *myGH; const ioGH *ioUtilGH; - const char *default_out_dir; const char *timer_names[4] = {"IOFlexIO time to dump parameters", "IOFlexIO time to dump datasets", "IOFlexIO total time to checkpoint", @@ -254,11 +253,8 @@ static void *SetupGH (tFleshConfig *config, int conv_level, cGH *GH) myGH->out2D_every_default = out2D_every - 1; /* get the names of output directories */ - default_out_dir = *(const char **) - CCTK_ParameterGet ("out_dir", - CCTK_ImplementationThorn ("IO"), NULL); - myGH->out2D_dir = strdup (*out2D_dir ? out2D_dir : default_out_dir); - myGH->out_dir = strdup (*out_dir ? out_dir : default_out_dir); + myGH->out2D_dir = strdup (*out2D_dir ? out2D_dir : io_out_dir); + myGH->out_dir = strdup (*out_dir ? out_dir : io_out_dir); /* create the output directories */ ioUtilGH = (const ioGH *) CCTK_GHExtension (GH, "IO"); |