aboutsummaryrefslogtreecommitdiff
path: root/src/Output2D.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/Output2D.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/Output2D.c')
-rw-r--r--src/Output2D.c24
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);
}