SWE
|
00001 00026 #ifndef VTKWRITER_HH_ 00027 #define VTKWRITER_HH_ 00028 00029 #include <sstream> 00030 #include "writer/Writer.hh" 00031 00032 namespace io { 00033 class VtkWriter; 00034 } 00035 00036 class io::VtkWriter : public io::Writer 00037 { 00038 private: 00040 float dX, dY; 00041 00042 float offsetX, offsetY; 00043 00044 public: 00045 VtkWriter( const std::string &i_fileName, 00046 const Float2D &i_b, 00047 const BoundarySize &i_boundarySize, 00048 int i_nX, int i_nY, 00049 float i_dX, float i_dY, 00050 int i_offsetX = 0, int i_offsetY = 0); 00051 00052 // writes the unknowns at a given time step to a vtk file 00053 void writeTimeStep( const Float2D &i_h, 00054 const Float2D &i_hu, 00055 const Float2D &i_hv, 00056 float i_time); 00057 00058 private: 00059 std::string generateFileName() 00060 { 00061 std::ostringstream name; 00062 00063 name << fileName << '.' << timeStep << ".vts"; 00064 return name.str(); 00065 } 00066 }; 00067 00068 #endif // VTKWRITER_HH_