00001 /* graphics of the mesh in Tecplot 00002 */ 00003 00004 #ifndef graphMeshTecplot_hh 00005 #define graphMeshTecplot_hh 00006 00007 #include <string> 00008 #include <fstream> 00009 #include <memory> 00010 #include "basics/typedefs.hh" 00011 #include "basics/vectorsMatricesForward.hh" 00012 #include "basics/exceptions.hh" 00013 #include "toolbox/dynArray.hh" 00014 #include "space/postProcess.hh" 00015 00016 namespace concepts { 00017 // forward declartions 00018 class Mesh2; 00019 class Mesh3; 00020 } // namespace concepts 00021 00022 namespace graphics { 00023 00024 // forward declartions 00025 class VertexList; 00026 00027 using concepts::Real; 00028 00029 // *********************************************************** MeshTecplot ** 00030 00035 template<typename F> 00036 class MeshTecplot { 00037 public: 00039 MeshTecplot(concepts::Mesh& msh, const std::string& filename); 00041 MeshTecplot(concepts::Space<F>& spc, const std::string& filename, 00042 const uint dim); 00043 private: 00044 const std::string filename_; 00045 }; 00046 00050 void drawMeshTecplot(concepts::Mesh& msh, const std::string& filename); 00051 00055 template<typename F> 00056 void drawMeshTecplot(concepts::Space<F>& spc, const std::string& filename, 00057 const uint dim); 00058 00059 // ******************************************************* MeshTecplotCell ** 00060 00064 template<typename F> 00065 class MeshTecplotCell : public concepts::CellPostprocess<F> { 00066 public: 00068 MeshTecplotCell(const std::string& filename, VertexList& vtxList, 00069 const uint nelm, const uint dim); 00070 virtual ~MeshTecplotCell(); 00071 virtual void operator() (const concepts::Element<F>& elm) 00072 throw(concepts::MissingFeature); 00073 virtual void operator() (const concepts::Cell& cell) 00074 throw(concepts::MissingFeature); 00075 private: 00077 std::ofstream file_; 00078 00080 VertexList& vtxList_; 00081 }; 00082 00083 } // namespace graphics 00084 00085 #endif // graphMeshTecplot_hh