diff options
Diffstat (limited to 'src/Output2D.c')
-rw-r--r-- | src/Output2D.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/src/Output2D.c b/src/Output2D.c index 9223938..7b4d14b 100644 --- a/src/Output2D.c +++ b/src/Output2D.c @@ -58,8 +58,8 @@ int IOFlexIO_Output2DGH (cGH *GH) /* Get the GH extension for IOFlexIO */ myGH = (flexioGH *) GH->extensions [CCTK_GHExtensionHandle ("IOFlexIO")]; - if (myGH->IO_2Devery <= 0) - return 0; + if (myGH->out2D_every <= 0) + return (0); /* Loop over all variables */ for (i = 0; i < CCTK_NumVars (); i++) { @@ -78,11 +78,8 @@ int IOFlexIO_Output2DGH (cGH *GH) free (fullname); - /* Register another 2D output for this GF */ - myGH->IO_2Dnum[i]++; - /* Register GF as having 2D output this iteration */ - myGH->IO_2Dlast[i] = GH->cctk_iteration; + myGH->out2D_last[i] = GH->cctk_iteration; } } @@ -129,13 +126,9 @@ int IOFlexIO_Output2DVarAs (cGH *GH, const char *fullname, const char *alias) { DECLARE_CCTK_PARAMETERS int index; - flexioGH *myGH; index = CCTK_VarIndex (fullname); - /* get the handle for IOFlexIO extensions */ - myGH = (flexioGH *) GH->extensions [CCTK_GHExtensionHandle ("IOFlexIO")]; - if (verbose) { printf ("\nIn IOFlexIO Output2DVarAs\n-------------------\n"); printf (" Fullname = -%s-\n", fullname); @@ -190,12 +183,12 @@ int IOFlexIO_TimeFor2D (cGH *GH, int index) myGH = (flexioGH *) GH->extensions [CCTK_GHExtensionHandle ("IOFlexIO")]; /* Check this GF should be output */ - if (! (CCTK_GroupTypeFromVarI (index) == GROUP_GF && myGH->IO_2Dnum [index] != 0 - && GH->cctk_iteration % myGH->IO_2Devery == 0)) + if (! (CCTK_GroupTypeFromVarI (index) == GROUP_GF && myGH->do_out2D [index] + && GH->cctk_iteration % myGH->out2D_every == 0)) return (0); /* Check GF not already output this iteration */ - if (myGH->IO_2Dlast [index] == GH->cctk_iteration) { + if (myGH->out2D_last [index] == GH->cctk_iteration) { CCTK_WARN (2, "Already done 2D output in IOFlexIO"); return (0); } @@ -266,11 +259,8 @@ int IOFlexIO_TriggerOutput2D (cGH *GH, int index) /* Do the 2D output */ IOFlexIO_Write2D (GH, index, varname); - /* Register another 2D output for this GF */ - myGH->IO_2Dnum [index]++; - /* Register GF as having 2D output this iteration */ - myGH->IO_2Dlast [index] = GH->cctk_iteration; + myGH->out2D_last [index] = GH->cctk_iteration; return (0); } |