aboutsummaryrefslogtreecommitdiff
path: root/src/Output3D.c
diff options
context:
space:
mode:
authortradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>1999-10-27 00:01:40 +0000
committertradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>1999-10-27 00:01:40 +0000
commit9fdeb058697419a6934a71d92987efcbb27f2233 (patch)
treec42741a4a1348649e29cf5c0f224c27504d12658 /src/Output3D.c
parent8d56ec8a794219d8f2623133ba5afb59c2f4549b (diff)
Tidying up several things:
- sp2xyz moved from PUGH's into IOFlexIO's GH extension call SetupSliceCenter() at startup to set up slice center for 2D output - fixed wrong indexing on ownership[] which caused buggy 2D output - use ParseVarsForOutput() instead of InitIONum() for parsing the out_vars parameter - decide which output dir shall be used by using CCTK_ParameterInfo() rather than comparing it with its old "outdir" default value - outdirs are always created now (not only if out_vars was non-empty) because IO methods might be invoked via CCTK_OutputVarAs() also - some variables renamed for better readability - fixed compiler warnings - hopefully get rid of empty IEEEIO subdir git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@62 ebee0441-1374-4afa-a3b5-247f3ba15b9a
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);
}