From 9810b34561aeafafaaf400590676782690f464b0 Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 27 May 2002 08:17:05 +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/IsoSurfacer/trunk@61 bfcf8e34-485d-4d46-a995-1fd6fa6fb178 --- src/IsoSurfacerInit.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'src') 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); -- cgit v1.2.3