aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@bfcf8e34-485d-4d46-a995-1fd6fa6fb178>2002-05-27 08:17:05 +0000
committertradke <tradke@bfcf8e34-485d-4d46-a995-1fd6fa6fb178>2002-05-27 08:17:05 +0000
commit9810b34561aeafafaaf400590676782690f464b0 (patch)
tree6027db0a347266b2f0dca9f55b52b512f16f972a
parent963aacf088f5c62136db11d92fbe117918b97887 (diff)
Make use of Tom's extensions to parameter declarations:
USE some_parameter AS alias. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IsoSurfacer/trunk@61 bfcf8e34-485d-4d46-a995-1fd6fa6fb178
-rw-r--r--param.ccl4
-rw-r--r--src/IsoSurfacerInit.c26
2 files changed, 14 insertions, 16 deletions
diff --git a/param.ccl b/param.ccl
index c0f9137..5e6ab65 100644
--- a/param.ccl
+++ b/param.ccl
@@ -95,6 +95,6 @@ STRING isosurfacer " What to isosurface and how. Format:{(functionName) (isoleve
#############################################################################
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
diff --git a/src/IsoSurfacerInit.c b/src/IsoSurfacerInit.c
index 0cfe99b..c12e072 100644
--- a/src/IsoSurfacerInit.c
+++ b/src/IsoSurfacerInit.c
@@ -68,12 +68,7 @@ int IsoSurfacer_InitGH (cGH *GH){
/* initialize values */
myGH->funcName=0;
myGH->formats=0;
- myGH->outfreq=out_every;
- if (myGH->outfreq < 0)
- {
- myGH->outfreq = *(const CCTK_INT *)
- CCTK_ParameterGet ("out_every", CCTK_ImplementationThorn ("IO"), NULL);
- }
+ myGH->outfreq=out_every >= 0 ? out_every : io_out_every;
myGH->firstIteration=out_start;
myGH->ComputeNormals=compute_normals;
/* printf("************* compute Normals = %u *****************\n",
@@ -113,18 +108,21 @@ int IsoSurfacer_InitGH (cGH *GH){
myGH->RunIsoSurfacer = 1;
/* get the name for IsoSurfacer output directory and make sure it exists */
- if (*out_dir == 0)
+ if (*out_dir)
{
- out_dir = *(const char **)
- CCTK_ParameterGet ("out_dir", CCTK_ImplementationThorn ("IO"), NULL);
+ i = IOUtil_CreateDirectory (GH, out_dir, 0, 0);
+ if (i < 0)
+ {
+ CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "Problem creating IsoSurfacer output directory '%s'",out_dir);
+ }
}
- i = IOUtil_CreateDirectory (GH, out_dir, 0, 0);
- if (i < 0)
+ else
{
- CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,
- "Problem creating IsoSurfacer output directory '%s'", out_dir);
+ out_dir = io_out_dir;
+ i = 0;
}
- else if (i >= 0 && CCTK_Equals (verbose, "full"))
+ if (i >= 0 && CCTK_Equals (verbose, "full"))
{
CCTK_VInfo (CCTK_THORNSTRING, "IsoSurfacer: Output to directory '%s'",
out_dir);