From 16199d0133bf240c793a0f398bb91509dd305078 Mon Sep 17 00:00:00 2001 From: tradke <> Date: Thu, 3 Jul 2003 08:02:00 +0000 Subject: Put '#ifdef HDF4' around HDF4-specific parts of the code. darcs-hash:20030703080203-1d9bf-96b0016155457f3a8e9de996c706ef8f49810b96.gz --- CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'CarpetAttic/CarpetIOFlexIO') 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 #include -#include -#include -#include -#include -#include -#include - #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 -- cgit v1.2.3