aboutsummaryrefslogtreecommitdiff
path: root/src/Write2D.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Write2D.c')
-rw-r--r--src/Write2D.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/Write2D.c b/src/Write2D.c
index 5ddb038..e430a62 100644
--- a/src/Write2D.c
+++ b/src/Write2D.c
@@ -15,7 +15,6 @@
#include "cctk.h"
#include "cctk_Parameters.h"
#include "util_Table.h"
-#include "CactusBase/IOUtil/src/ioGH.h"
#include "CactusBase/IOUtil/src/ioutil_AdvertisedFiles.h"
#include "ioASCIIGH.h"
@@ -163,7 +162,7 @@ int IOASCII_Write2D (const cGH *GH, int vindex, const char *alias)
return (-1);
}
- /* get the handle for IOASCII extensions */
+ /* get the handle for IOASCII extension */
myGH = CCTK_GHExtension (GH, "IOASCII");
/* get the number of slices to output */
@@ -393,16 +392,14 @@ static FILE **OpenFile (const cGH *GH,
FILE **fileset;
char *filename;
asciiioGH *myGH;
- const ioGH *ioUtilGH;
ioAdvertisedFileDesc advertised_file;
char slicename[30], zlabel_fmt_string[30], buffer[128];
const char *extensions[] = {"xy", "xz", "yz"};
DECLARE_CCTK_PARAMETERS
- /* get handles for IOUtil and IOASCII extensions */
+ /* get handle for IOASCII extension */
myGH = CCTK_GHExtension (GH, "IOASCII");
- ioUtilGH = CCTK_GHExtension (GH, "IO");
/* see if we are the first time through */
fileset = (FILE **) GetNamedData (myGH->fileList_2D, alias);
@@ -448,7 +445,7 @@ static FILE **OpenFile (const cGH *GH,
}
/* if restart from recovery, try to open an existing file ... */
- fileset[dir] = fopen (filename, ioUtilGH->recovered ? "a" : "w");
+ fileset[dir] = fopen (filename, IO_TruncateOutputFiles (GH) ? "w" : "a");
if (! fileset[dir])
{
CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,