00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef CMGUIDEFORMEDSOLUTIONSWRITER_HPP_
00031 #define CMGUIDEFORMEDSOLUTIONSWRITER_HPP_
00032
00033 #include "CmguiMeshWriter.hpp"
00034 #include "QuadraticMesh.hpp"
00035
00041 typedef enum CmguiMeshWriteType_
00042 {
00043 WRITE_LINEAR_MESH = 0,
00044 WRITE_QUADRATIC_MESH
00045 } CmguiMeshWriteType;
00046
00055 template<unsigned DIM>
00056 class CmguiDeformedSolutionsWriter : public CmguiMeshWriter<DIM, DIM>
00057 {
00058 private:
00063 QuadraticMesh<DIM>* mpQuadraticMesh;
00064
00069 unsigned mFinalCounter;
00070
00075 unsigned mNumNodesToUse;
00076
00081 unsigned GetNumNodes()
00082 {
00083 return mNumNodesToUse;
00084 }
00085
00086 public:
00097 CmguiDeformedSolutionsWriter(std::string outputDirectory,
00098 std::string baseName,
00099 QuadraticMesh<DIM>& rQuadraticMesh,
00100 CmguiMeshWriteType writeType);
00101
00105 void WriteInitialMesh();
00106
00113 void WriteDeformationPositions(std::vector<c_vector<double,DIM> >& rDeformedPositions,
00114 unsigned counter);
00115
00127 void WriteCmguiScript(std::string fieldBaseName="");
00128
00138 void ConvertOutput(std::string inputDirectory,
00139 std::string inputFileBaseName,
00140 unsigned finalCounter);
00141 };
00142
00143
00144
00145 #endif
00146