00001 #ifndef _HDF5EXPORTER_H_
00002 #define _HDF5EXPORTER_H_
00003
00004 #ifdef OLD_HEADER_FILENAME
00005 #include <iostream.h>
00006 #else
00007 #include <iostream>
00008 #endif
00009 #include <string>
00010
00011 #ifndef H5_NO_NAMESPACE
00012 #ifndef H5_NO_STD
00013 using std::cout;
00014 using std::endl;
00015 #endif // H5_NO_STD
00016 #endif
00017
00018
00019 #include <H5Cpp.h>
00020
00021 #ifndef H5_NO_NAMESPACE
00022 using namespace H5;
00023 #endif
00024
00025 #include "IMeshWriter.h"
00026
00027
00028 class HDF5Exporter : public MeshWrite::IMeshWriter
00029 {
00030 public:
00031 HDF5Exporter(const std::string & file_name) ;
00032 ~HDF5Exporter(void) {} ;
00033
00038 bool Init();
00039 bool Init(const std::string & name){ return false; }
00040
00043 void Free();
00044
00047 void WriteVerticesCount(const int noVerts);
00048
00051 void WriteVertex(const double coords[],const uTind type);
00052
00055 void WriteEdgesCount(const int noEdges);
00056
00059 void WriteEdge(const uTind verts[], const uTind type);
00060
00063 void WriteFacesCount(const int noFaces);
00064
00067 void WriteFace(const uTind edges[],const uTind type,const int8_t bc, const uTind neigh[]);
00068
00071 void WriteElementCount(const int noElems);
00072
00076 void WriteElement(const uTind faces[], const uTind neighbours[],const uTind type, const uTind father, const int8_t ref, const int8_t material);
00077
00078 protected:
00079
00080
00081 H5File file;
00082
00083 ArrayType coords_t, sons3_t, sonsFace_t;
00084 CompType hObj_t,
00085 vertex_t,
00086 edge_t,
00087 side4_t,
00088
00089 elemT4_t,
00090 elemPrism_t;
00091
00092 static const hsize_t dims[25];
00093
00094
00095
00096
00097
00098 };
00099 #endif // _HDF5EXPORTER_H_