diff options
author | tradke <tradke@4825ed28-b72c-4eae-9704-e50c059e567d> | 2002-05-06 09:21:30 +0000 |
---|---|---|
committer | tradke <tradke@4825ed28-b72c-4eae-9704-e50c059e567d> | 2002-05-06 09:21:30 +0000 |
commit | 05b0fe4b1f1337319fbd1beb6928610bb92f57b3 (patch) | |
tree | cc453d31302e5633d4114666a7747d4c7bebe12b /src/Output.c | |
parent | cfd0aa21d5237ba08b06f687c21f5d1d56a41003 (diff) |
Parameter names changes as announced in today's mail to users@cactuscode.org.
You must also update thorns IOHDF5Util and IOUtil now.
This thorn will be moved from AlphaThorns to CactusPUGHIO now.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5/trunk@127 4825ed28-b72c-4eae-9704-e50c059e567d
Diffstat (limited to 'src/Output.c')
-rw-r--r-- | src/Output.c | 60 |
1 files changed, 19 insertions, 41 deletions
diff --git a/src/Output.c b/src/Output.c index b06e979..fb0f0d9 100644 --- a/src/Output.c +++ b/src/Output.c @@ -16,8 +16,8 @@ #include "ioHDF5GH.h" /* the rcs ID and its dummy function to use it */ -static const char *rcsid = "$Id$"; -CCTK_FILEVERSION(AlphaThorns_IOHDF5_Output_c) +static const char *rcsid = "$Header$"; +CCTK_FILEVERSION(CactusPUGHIO_IOHDF5_Output_c) /******************************************************************** @@ -35,10 +35,10 @@ static void CheckSteerableParameters (const cGH *GH); @enddesc @calls IOHDF5_TimeFor - IOHDF5_OutputVarAs + IOHDF5_Write @var GH - @vdesc Pointer to CCTK GH + @vdesc pointer to CCTK GH @vtype const cGH * @vio in @endvar @@ -52,43 +52,21 @@ static void CheckSteerableParameters (const cGH *GH); int IOHDF5_OutputGH (const cGH *GH) { int vindex, retval; - ioHDF5GH *myGH; - char *fullname; - const char *name; - DECLARE_CCTK_PARAMETERS - - - myGH = (ioHDF5GH *) CCTK_GHExtension (GH, "IOHDF5"); + const ioHDF5GH *myGH; - CheckSteerableParameters (GH); - if (myGH->out_every <= 0) - { - return (0); - } + retval = 0; + myGH = (const ioHDF5GH *) CCTK_GHExtension (GH, "IOHDF5"); /* loop over all variables */ - for (vindex = retval = 0; vindex < CCTK_NumVars (); vindex++) + for (vindex = CCTK_NumVars () - 1; vindex >= 0; vindex--) { - if (IOHDF5_TimeFor (GH, vindex)) + if (IOHDF5_TimeFor (GH, vindex) && + IOHDF5_Write (GH, vindex, CCTK_VarName (vindex)) == 0) { - name = CCTK_VarName (vindex); - fullname = CCTK_FullName (vindex); - - if (verbose) - { - CCTK_VInfo (CCTK_THORNSTRING, "IOHDF5_OutputGH: (fullname, name) = " - "(%s, %s)", fullname, name); - } - - if (IOHDF5_OutputVarAs (GH, fullname, name) == 0) - { - /* register variable as having output this iteration */ - myGH->out_last[vindex] = GH->cctk_iteration; - retval++; - } - - free (fullname); + /* register variable as having output this iteration */ + myGH->out_last[vindex] = GH->cctk_iteration; + retval++; } } @@ -107,7 +85,7 @@ int IOHDF5_OutputGH (const cGH *GH) @calls IOHDF5_Write @var GH - @vdesc Pointer to CCTK GH + @vdesc pointer to CCTK GH @vtype const cGH * @vio in @endvar @@ -137,7 +115,7 @@ int IOHDF5_OutputVarAs (const cGH *GH, const char *fullname, const char *alias) vindex = CCTK_VarIndex (fullname); - if (verbose) + if (CCTK_Equals (verbose, "full")) { CCTK_VInfo (CCTK_THORNSTRING, "IOHDF5_OutputVarAs: fullname, alias, " "index = (%s, %s, %d)", fullname, alias, vindex); @@ -175,7 +153,7 @@ int IOHDF5_OutputVarAs (const cGH *GH, const char *fullname, const char *alias) @calls CheckSteerableParameters @var GH - @vdesc Pointer to CCTK GH + @vdesc pointer to CCTK GH @vtype const cGH * @vio in @endvar @@ -233,7 +211,7 @@ int IOHDF5_TimeFor (const cGH *GH, int vindex) @calls IOHDF5_Write @var GH - @vdesc Pointer to CCTK GH + @vdesc pointer to CCTK GH @vtype const cGH * @vio in @endvar @@ -261,7 +239,7 @@ int IOHDF5_TriggerOutput (const cGH *GH, int vindex) myGH = (ioHDF5GH *) CCTK_GHExtension (GH, "IOHDF5"); - if (verbose) + if (CCTK_Equals (verbose, "full")) { fullname = CCTK_FullName (vindex); CCTK_VInfo (CCTK_THORNSTRING, "IOHDF5_TriggerOutput: " @@ -298,7 +276,7 @@ int IOHDF5_TriggerOutput (const cGH *GH, int vindex) @calls IOHDF5Util_ParseVarsForOutput @var GH - @vdesc Pointer to CCTK grid hierarchy + @vdesc pointer to CCTK grid hierarchy @vtype const cGH * @vio in @endvar |