aboutsummaryrefslogtreecommitdiff
path: root/CarpetAttic/CarpetIOFlexIO
diff options
context:
space:
mode:
authortradke <>2003-07-03 08:02:00 +0000
committertradke <>2003-07-03 08:02:00 +0000
commit16199d0133bf240c793a0f398bb91509dd305078 (patch)
tree3577faccfcdc135b6d4e476f84c795f574c56da8 /CarpetAttic/CarpetIOFlexIO
parent5daeb0bd3638dbfc3f86df6caba375979c38c134 (diff)
Put '#ifdef HDF4' around HDF4-specific parts of the code.
darcs-hash:20030703080203-1d9bf-96b0016155457f3a8e9de996c706ef8f49810b96.gz
Diffstat (limited to 'CarpetAttic/CarpetIOFlexIO')
-rw-r--r--CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc29
1 files changed, 18 insertions, 11 deletions
diff --git a/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc b/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc
index f6b596666..11be50401 100644
--- a/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc
+++ b/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc
@@ -11,16 +11,17 @@
#include <sstream>
#include <vector>
-#include <AMRwriter.hh>
-#include <AmrGridReader.hh>
-#include <H5IO.hh>
-#include <HDFIO.hh>
-#include <IEEEIO.hh>
-#include <IO.hh>
-
#include "cctk.h"
#include "cctk_Parameters.h"
+#include "AMRwriter.hh"
+#include "AmrGridReader.hh"
+#ifdef HDF5
+#include "H5IO.hh"
+#endif
+#include "IEEEIO.hh"
+#include "IO.hh"
+
#include "CactusBase/IOUtil/src/ioGH.h"
#include "bbox.hh"
@@ -34,7 +35,7 @@
#include "ioflexio.hh"
extern "C" {
- static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc,v 1.27 2003/06/18 18:28:07 schnetter Exp $";
+ static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc,v 1.28 2003/07/03 10:02:03 tradke Exp $";
CCTK_FILEVERSION(Carpet_CarpetIOFlexIO_ioflexio_cc);
}
@@ -184,9 +185,11 @@ namespace CarpetIOFlexIO {
writer = 0;
if (CCTK_Equals(out3D_format, "IEEE")) {
writer = new IEEEIO(filename, IObase::Create);
-#ifdef HDF5
+#ifdef HDF4
} else if (CCTK_Equals(out3D_format, "HDF4")) {
writer = new HDFIO(filename, IObase::Create);
+#endif
+#ifdef HDF5
} else if (CCTK_Equals(out3D_format, "HDF5")) {
writer = new H5IO(filename, IObase::Create);
#endif
@@ -201,9 +204,11 @@ namespace CarpetIOFlexIO {
// Open the file
if (CCTK_Equals(out3D_format, "IEEE")) {
writer = new IEEEIO(filename, IObase::Append);
-#ifdef HDF5
+#ifdef HDF4
} else if (CCTK_Equals(out3D_format, "HDF4")) {
writer = new HDFIO(filename, IObase::Append);
+#endif
+#ifdef HDF5
} else if (CCTK_Equals(out3D_format, "HDF5")) {
writer = new H5IO(filename, IObase::Append);
#endif
@@ -458,9 +463,11 @@ namespace CarpetIOFlexIO {
if (verbose) CCTK_VInfo (CCTK_THORNSTRING, "Opening file \"%s\"", filename);
if (CCTK_Equals(in3D_format, "IEEE")) {
reader = new IEEEIO(filename, IObase::Read);
-#ifdef HDF5
+#ifdef HDF4
} else if (CCTK_Equals(in3D_format, "HDF4")) {
reader = new HDFIO(filename, IObase::Read);
+#endif
+#ifdef HDF5
} else if (CCTK_Equals(in3D_format, "HDF5")) {
reader = new H5IO(filename, IObase::Read);
#endif