diff options
Diffstat (limited to 'src/Output2D.c')
-rw-r--r-- | src/Output2D.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/src/Output2D.c b/src/Output2D.c index 887e333..556c745 100644 --- a/src/Output2D.c +++ b/src/Output2D.c @@ -11,10 +11,8 @@ /* function prototypes */ -int IOJpeg_TimeFor2D (cGH *GH, int index); -int IOJpeg_Output2DVarAs (cGH *GH, const char *var, const char *alias); static void CheckSteerableParameters (IOJpegGH *myGH); -static void SetOutputFlag (int index, const char *optstring, void *arg); +static void SetOutputFlag (int vindex, const char *optstring, void *arg); /*@@ @@ -86,12 +84,12 @@ int IOJpeg_Output2DGH (cGH *GH) int IOJpeg_Output2DVarAs (cGH *GH, const char *fullname, const char *alias) { DECLARE_CCTK_PARAMETERS - int index,ierr=0; + int vindex,ierr=0; - index = CCTK_VarIndex (fullname); + vindex = CCTK_VarIndex (fullname); /* first, check if variable has storage assigned */ - if (! CCTK_QueryGroupStorageI (GH, CCTK_GroupIndexFromVarI (index))) + if (! CCTK_QueryGroupStorageI (GH, CCTK_GroupIndexFromVarI (vindex))) { CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING, "No IOJpeg 2D output for '%s' (no storage)", fullname); @@ -101,16 +99,16 @@ int IOJpeg_Output2DVarAs (cGH *GH, const char *fullname, const char *alias) if (!CCTK_Equals(verbose,"no")) { CCTK_VInfo (CCTK_THORNSTRING, "IOJpeg_Output2DVarAs: fullname, alias, " - "index = (%s, %s, %d)", fullname, alias, index); + "index = (%s, %s, %d)", fullname, alias, vindex); } /* Do the 2D output */ - ierr=IOJpeg_Write2D (GH, index, alias); + ierr=IOJpeg_Write2D (GH, vindex, alias); return (ierr); } -int IOJpeg_TimeFor2D (cGH *GH, int index) +int IOJpeg_TimeFor2D (cGH *GH, int vindex) { IOJpegGH *myGH; @@ -127,14 +125,14 @@ int IOJpeg_TimeFor2D (cGH *GH, int index) } /* Check this variable should be output */ - if (! (myGH->do_out2D [index] && GH->cctk_iteration % myGH->out2D_every == 0)) + if (! (myGH->do_out2D [vindex] && GH->cctk_iteration % myGH->out2D_every == 0)) { return (0); } /* Check variable not already output this iteration */ - if (myGH->out2D_last [index] == GH->cctk_iteration) + if (myGH->out2D_last [vindex] == GH->cctk_iteration) { CCTK_WARN (2, "Already done 2D output in IOJpeg"); return (0); @@ -143,28 +141,28 @@ int IOJpeg_TimeFor2D (cGH *GH, int index) return (1); } -int IOJpeg_TriggerOutput2D (cGH *GH, int index) +int IOJpeg_TriggerOutput2D (cGH *GH, int vindex) { DECLARE_CCTK_PARAMETERS IOJpegGH *myGH; const char *varname; int ierr=0; - varname = CCTK_VarName (index); + varname = CCTK_VarName (vindex); myGH = (IOJpegGH *) GH->extensions [CCTK_GHExtensionHandle ("IOJpeg")]; if (!CCTK_Equals(verbose,"no")) { CCTK_VInfo (CCTK_THORNSTRING, "IOJpeg_TriggerOutput2D: varname, index = " - "(%s, %d)", varname, index); + "(%s, %d)", varname, vindex); } /* Do the 2D output */ - ierr=IOJpeg_Write2D (GH, index, varname); + ierr=IOJpeg_Write2D (GH, vindex, varname); /* Register variable as having 2D output this iteration */ - myGH->out2D_last [index] = GH->cctk_iteration; + myGH->out2D_last [vindex] = GH->cctk_iteration; return (ierr); } @@ -204,12 +202,12 @@ static void CheckSteerableParameters (IOJpegGH *myGH) /* callback for CCTK_TraverseString() to set the output flag for the given variable */ -static void SetOutputFlag (int index, const char *optstring, void *arg) +static void SetOutputFlag (int vindex, const char *optstring, void *arg) { char *flags = (char *) arg; - flags[index] = 1; + flags[vindex] = 1; if (optstring) { |