aboutsummaryrefslogtreecommitdiff
path: root/src/Output3D.c
diff options
context:
space:
mode:
authortradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>1999-07-22 17:58:44 +0000
committertradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>1999-07-22 17:58:44 +0000
commitf2adb19bfb1515ef99c702be8970b954951857f8 (patch)
tree95b6e8bde994db91926fc6975979af55c73ca560 /src/Output3D.c
parent509db8d8789f68e6d179d20f0ed28de5cdf3b538 (diff)
Always register IO methods in setup so that one can call them via
CCTK_OutputVarAsByMethod. Store names of output files in a database instead of a fixed array, use the alias name as search index. Fix some compiler warnings. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@19 ebee0441-1374-4afa-a3b5-247f3ba15b9a
Diffstat (limited to 'src/Output3D.c')
-rw-r--r--src/Output3D.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/Output3D.c b/src/Output3D.c
index 16ee047..8fc6265 100644
--- a/src/Output3D.c
+++ b/src/Output3D.c
@@ -13,11 +13,15 @@
#include <stdio.h>
#include <assert.h>
-#include <strings.h>
+#include <stdlib.h>
+#include <string.h>
#include "flesh.h"
#include "Groups.h"
#include "cctk_parameters.h"
+#include "GHExtensions.h"
+#include "WarnLevel.h"
+#include "Comm.h"
#include "CactusBase/IOUtil/src/ioGH.h"
#include "ioFlexGH.h"
@@ -130,7 +134,7 @@ int IOFlexIO_Output3DGH (cGH *GH)
int IOFlexIO_Output3DVarAs (cGH *GH, const char *fullname, const char *alias)
{
DECLARE_CCTK_PARAMETERS
- int index, first;
+ int index;
flexioGH *myGH;
index = CCTK_VarIndex(fullname);
@@ -138,9 +142,6 @@ int IOFlexIO_Output3DVarAs (cGH *GH, const char *fullname, const char *alias)
/* Get the GH extension for IOFlexIO */
myGH = (flexioGH *) GH->extensions [CCTK_GHExtensionHandle ("IOFlexIO")];
- /* Output with correct file opening behaviour */
- first = (myGH->IO_3Dnum [index] == 1);
-
if (output_verbose) {
printf ("\nIn IOFlexIO Output3DVarAs\n-------------------\n");
printf (" Fullname = -%s-\n", fullname);
@@ -149,7 +150,7 @@ int IOFlexIO_Output3DVarAs (cGH *GH, const char *fullname, const char *alias)
}
/* Do the 3D output */
- IOFlexIO_Write3D (GH, index, alias, first);
+ IOFlexIO_Write3D (GH, index, alias);
return (0);
}
@@ -255,7 +256,6 @@ int IOFlexIO_TimeFor3D (cGH *GH, int index)
int IOFlexIO_TriggerOutput3D (cGH *GH, int index)
{
DECLARE_CCTK_PARAMETERS
- int first;
flexioGH *myGH;
char *varname;
@@ -264,9 +264,6 @@ int IOFlexIO_TriggerOutput3D (cGH *GH, int index)
/* Get the GH extension for IOFlexIO */
myGH = (flexioGH *) GH->extensions [CCTK_GHExtensionHandle ("IOFlexIO")];
- /* Output with correct file opening behaviour */
- first = (myGH->IO_3Dnum [index] == 1);
-
if (output_verbose) {
printf("\nIn IOFlexIO TriggerOutput3D\n---------------------\n");
printf(" Index = %d\n", index);
@@ -274,7 +271,7 @@ int IOFlexIO_TriggerOutput3D (cGH *GH, int index)
}
/* Do the 3D output */
- IOFlexIO_Write3D (GH, index, varname, first);
+ IOFlexIO_Write3D (GH, index, varname);
/* Register another 3D output for this GF */
myGH->IO_3Dnum [index]++;