27 #ifndef SCHNEK_HDFDIAGNOSTIC_HPP_ 28 #define SCHNEK_HDFDIAGNOSTIC_HPP_ 30 #include "../schnek_config.hpp" 31 #ifdef SCHNEK_HAVE_HDF5 33 #include "../grid/grid.hpp" 34 #include "diagnostic.hpp" 40 template<
typename FieldType>
44 typename FieldType::IndexType global_min;
45 typename FieldType::IndexType global_max;
46 typename FieldType::IndexType local_min;
47 typename FieldType::IndexType local_max;
64 std::string blockname;
76 HdfStream(
const HdfStream&);
81 virtual int open(
const char*)=0;
87 virtual bool good()
const;
89 void setBlockName(std::string blockname_);
91 HdfStream& operator = (
const HdfStream&);
93 void setActive(
bool active_) { active = active_; activeModified =
true; }
96 std::string getNextBlockName();
98 #if defined (H5_HAVE_PARALLEL) && defined (SCHNEK_USE_HDF_PARALLEL) 109 class HdfIStream :
public HdfStream {
115 HdfIStream(
const HdfIStream&);
118 HdfIStream(
const char* fname);
121 int open(
const char*);
124 template<
typename FieldType>
125 void readGrid(GridContainer<FieldType> &g);
130 class HdfOStream :
public HdfStream {
138 HdfOStream(
const HdfOStream&);
141 HdfOStream(
const char* fname);
144 int open(
const char*);
147 template<
typename FieldType>
148 void writeGrid(GridContainer<FieldType> &g);
151 template<
typename TYPE>
153 static const hid_t type;
156 template<
typename Type,
typename Po
interType = boost::shared_ptr<Type>,
class DiagnosticType = IntervalDiagnostic >
157 class HDFGridDiagnostic :
public SimpleDiagnostic<Type, PointerType, DiagnosticType> {
160 GridContainer<Type> container;
162 typedef typename Type::IndexType IndexType;
163 void open(
const std::string &);
167 virtual IndexType getGlobalMin() = 0;
168 virtual IndexType getGlobalMax() = 0;
170 virtual ~HDFGridDiagnostic() {}
175 #include "hdfdiagnostic.t" 179 #endif // SCHNEK_HDFDIAGNOSTIC_HPP_