aboutsummaryrefslogtreecommitdiff
path: root/src/Output3D.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Output3D.c')
-rw-r--r--src/Output3D.c35
1 files changed, 12 insertions, 23 deletions
diff --git a/src/Output3D.c b/src/Output3D.c
index ecb72fa..2c83fd2 100644
--- a/src/Output3D.c
+++ b/src/Output3D.c
@@ -3,7 +3,7 @@
@date Tue Jan 9 1999
@author Gabrielle Allen
@desc
- Functions to deal 3D output of GFs
+ Functions to deal 3D output of variables
@enddesc
@history
@hauthor Thomas Radke @hdate 16 Mar 1999
@@ -60,8 +60,8 @@ int IOFlexIO_Output3DGH (cGH *GH)
/* Get the GH extension for IOFlexIO */
myGH = (flexioGH *) GH->extensions [CCTK_GHExtensionHandle ("IOFlexIO")];
- if (myGH->IO_3Devery <= 0)
- return 0;
+ if (myGH->out3D_every <= 0)
+ return (0);
/* Loop over all variables */
for (i = 0; i < CCTK_NumVars (); i++) {
@@ -82,11 +82,8 @@ int IOFlexIO_Output3DGH (cGH *GH)
free (fullname);
- /* Register another 3D output for this GF */
- myGH->IO_3Dnum [i]++;
-
- /* Register GF as having 3D output this iteration */
- myGH->IO_3Dlast [i] = GH->cctk_iteration;
+ /* Register variables as having 3D output this iteration */
+ myGH->out3D_last [i] = GH->cctk_iteration;
}
}
@@ -133,13 +130,9 @@ int IOFlexIO_Output3DVarAs (cGH *GH, const char *fullname, const char *alias)
{
DECLARE_CCTK_PARAMETERS
int index;
- flexioGH *myGH;
index = CCTK_VarIndex(fullname);
- /* Get the GH extension for IOFlexIO */
- myGH = (flexioGH *) GH->extensions [CCTK_GHExtensionHandle ("IOFlexIO")];
-
if (verbose) {
printf ("\nIn IOFlexIO Output3DVarAs\n-------------------\n");
printf (" Fullname = -%s-\n", fullname);
@@ -192,18 +185,17 @@ int IOFlexIO_TimeFor3D (cGH *GH, int index)
/* Get the GH extension for IOFlexIO */
myGH = (flexioGH *) GH->extensions [CCTK_GHExtensionHandle ("IOFlexIO")];
- /* Check this GF should be output */
- if (! (myGH->IO_3Dnum [index] != 0 &&
- GH->cctk_iteration % myGH->IO_3Devery == 0))
+ /* Check this var should be output */
+ if (! (myGH->do_out3D [index] && GH->cctk_iteration % myGH->out3D_every == 0))
return (0);
- /* Check GF not already output this iteration */
- if (myGH->IO_3Dlast [index] == GH->cctk_iteration) {
+ /* Check var not already output this iteration */
+ if (myGH->out3D_last [index] == GH->cctk_iteration) {
CCTK_WARN (2, "Already done 3D output in IOFlexIO");
return (0);
}
- /* Check GF has storage */
+ /* Check var has storage */
if (! CCTK_QueryGroupStorageI (GH,
CCTK_GroupIndexFromVarI(index))) {
char *fullname = CCTK_FullName (index);
@@ -269,11 +261,8 @@ int IOFlexIO_TriggerOutput3D (cGH *GH, int index)
/* Do the 3D output */
IOFlexIO_Write3D (GH, index, varname);
- /* Register another 3D output for this GF */
- myGH->IO_3Dnum [index]++;
-
- /* Register GF as having 3D output this iteration */
- myGH->IO_3Dlast [index] = GH->cctk_iteration;
+ /* Register var as having 3D output this iteration */
+ myGH->out3D_last [index] = GH->cctk_iteration;
return (0);
}