36 #ifndef CMGUIWRITER_HPP_ 37 #define CMGUIWRITER_HPP_ 39 #include "AbstractTetrahedralMeshWriter.hpp" 40 #include "OutputFileHandler.hpp" 45 static const char CmguiNodeFileHeader3D[] =
" #Fields=1\n\ 46 1) coordinates, coordinate, rectangular cartesian, #Components=3\n\ 47 x. Value index= 1, #Derivatives= 0\n\ 48 y. Value index= 2, #Derivatives= 0\n\ 49 z. Value index= 3, #Derivatives= 0\n";
54 static const char CmguiNodeFileHeader2D[] =
" #Fields=1\n\ 55 1) coordinates, coordinate, rectangular cartesian, #Components=2\n\ 56 x. Value index= 1, #Derivatives= 0\n\ 57 y. Value index= 2, #Derivatives= 0\n";
63 static const char CmguiNodeFileHeader1D[] =
" #Fields=1\n\ 64 1) coordinates, coordinate, rectangular cartesian, #Components=1\n\ 65 x. Value index= 1, #Derivatives= 0\n";
70 static const char CmguiElementFileHeader3D[] =
"Shape. Dimension=3, simplex(2;3)*simplex*simplex\n\ 71 #Scale factor sets= 0\n\ 77 static const char CmguiElementFileHeader3DQuadratic[] =
"Shape. Dimension=3, simplex(2;3)*simplex*simplex\n\ 78 #Scale factor sets= 0\n\ 85 static const char CmguiElementFileHeader2D[] =
"Shape. Dimension=2, simplex(2)*simplex\n\ 86 #Scale factor sets= 0\n\ 92 static const char CmguiElementFileHeader2DQuadratic[] =
"Shape. Dimension=2, simplex(2)*simplex\n\ 93 #Scale factor sets= 0\n\ 99 static const char CmguiElementFileHeader1D[] =
"Shape. Dimension=1, line\n\ 100 #Scale factor sets= 0\n\ 106 static const char CmguiElementFileHeader1DQuadratic[] =
"Shape. Dimension=1, line\n\ 107 #Scale factor sets= 0\n\ 114 static const char CmguiCoordinatesFileHeader3D[] =
" 1) coordinates, coordinate, rectangular cartesian, #Components=3\n\ 115 x. l.simplex(2;3)*l.simplex*l.simplex, no modify, standard node based.\n\ 119 Scale factor indices: 1\n\ 122 Scale factor indices: 2\n\ 125 Scale factor indices: 3\n\ 128 Scale factor indices: 4\n\ 129 y. l.simplex(2;3)*l.simplex*l.simplex, no modify, standard node based.\n\ 133 Scale factor indices: 1\n\ 136 Scale factor indices: 2\n\ 139 Scale factor indices: 3\n\ 142 Scale factor indices: 4\n\ 143 z. l.simplex(2;3)*l.simplex*l.simplex, no modify, standard node based.\n\ 147 Scale factor indices: 1\n\ 150 Scale factor indices: 2\n\ 153 Scale factor indices: 3\n\ 156 Scale factor indices: 4\n";
162 static const char CmguiCoordinatesFileHeader3DQuadratic[] =
" 1) coordinates, coordinate, rectangular cartesian, #Components=3\n\ 163 x. q.simplex(2;3)*q.simplex*q.simplex, no modify, standard node based.\n\ 167 Scale factor indices: 1\n\ 170 Scale factor indices: 2\n\ 173 Scale factor indices: 3\n\ 176 Scale factor indices: 4\n\ 179 Scale factor indices: 5\n\ 182 Scale factor indices: 6\n\ 185 Scale factor indices: 7\n\ 188 Scale factor indices: 8\n\ 191 Scale factor indices: 9\n\ 194 Scale factor indices: 10\n\ 195 y. q.simplex(2;3)*q.simplex*q.simplex, no modify, standard node based.\n\ 199 Scale factor indices: 1\n\ 202 Scale factor indices: 2\n\ 205 Scale factor indices: 3\n\ 208 Scale factor indices: 4\n\ 211 Scale factor indices: 5\n\ 214 Scale factor indices: 6\n\ 217 Scale factor indices: 7\n\ 220 Scale factor indices: 8\n\ 223 Scale factor indices: 9\n\ 226 Scale factor indices: 10\n\ 227 z. q.simplex(2;3)*q.simplex*q.simplex, no modify, standard node based.\n\ 231 Scale factor indices: 1\n\ 234 Scale factor indices: 2\n\ 237 Scale factor indices: 3\n\ 240 Scale factor indices: 4\n\ 243 Scale factor indices: 5\n\ 246 Scale factor indices: 6\n\ 249 Scale factor indices: 7\n\ 252 Scale factor indices: 8\n\ 255 Scale factor indices: 9\n\ 258 Scale factor indices: 10\n";
264 static const char CmguiCoordinatesFileHeader2D[] =
" 1) coordinates, coordinate, rectangular cartesian, #Components=2\n\ 265 x. l.simplex(2)*l.simplex, no modify, standard node based.\n\ 269 Scale factor indices: 1\n\ 272 Scale factor indices: 2\n\ 275 Scale factor indices: 3\n\ 276 y. l.simplex(2)*l.simplex, no modify, standard node based.\n\ 280 Scale factor indices: 1\n\ 283 Scale factor indices: 2\n\ 286 Scale factor indices: 3\n";
293 static const char CmguiCoordinatesFileHeader2DQuadratic[] =
" 1) coordinates, coordinate, rectangular cartesian, #Components=2\n\ 294 x. q.simplex(2)*q.simplex, no modify, standard node based.\n\ 298 Scale factor indices: 1\n\ 301 Scale factor indices: 2\n\ 304 Scale factor indices: 3\n\ 307 Scale factor indices: 4\n\ 310 Scale factor indices: 5\n\ 313 Scale factor indices: 6\n\ 314 y. q.simplex(2)*q.simplex, no modify, standard node based.\n\ 318 Scale factor indices: 1\n\ 321 Scale factor indices: 2\n\ 324 Scale factor indices: 3\n\ 327 Scale factor indices: 4\n\ 330 Scale factor indices: 5\n\ 333 Scale factor indices: 6\n";
339 static const char CmguiCoordinatesFileHeader1D[] =
" 1) coordinates, coordinate, rectangular cartesian, #Components=1\n\ 340 x. l.Lagrange, no modify, standard node based.\n\ 344 Scale factor indices: 1\n\ 347 Scale factor indices: 2\n";
354 static const char CmguiCoordinatesFileHeader1DQuadratic[] =
" 1) coordinates, coordinate, rectangular cartesian, #Components=1\n\ 355 x. q.Lagrange, no modify, standard node based.\n\ 359 Scale factor indices: 1\n\ 362 Scale factor indices: 2\n\ 365 Scale factor indices: 3\n";
371 static const char CmguiAdditionalFieldHeader3D[] =
" field, rectangular cartesian, #Components=1\n\ 372 x. l.simplex(2;3)*l.simplex*l.simplex, no modify, standard node based.\n\ 376 Scale factor indices: 1\n\ 379 Scale factor indices: 2\n\ 382 Scale factor indices: 3\n\ 385 Scale factor indices: 4\n";
393 static const char CmguiAdditionalFieldHeader3DQuadratic[] =
" field, rectangular cartesian, #Components=1\n\ 394 x. q.simplex(2;3)*q.simplex*q.simplex, no modify, standard node based.\n\ 398 Scale factor indices: 1\n\ 401 Scale factor indices: 2\n\ 404 Scale factor indices: 3\n\ 407 Scale factor indices: 4\n\ 410 Scale factor indices: 5\n\ 413 Scale factor indices: 6\n\ 416 Scale factor indices: 7\n\ 419 Scale factor indices: 8\n\ 422 Scale factor indices: 9\n\ 425 Scale factor indices: 10\n";
431 static const char CmguiAdditionalFieldHeader2D[] =
" field, rectangular cartesian, #Components=1\n\ 432 x. l.simplex(2)*l.simplex, no modify, standard node based.\n\ 436 Scale factor indices: 1\n\ 439 Scale factor indices: 2\n\ 442 Scale factor indices: 3\n";
448 static const char CmguiAdditionalFieldHeader2DQuadratic[] =
" field, rectangular cartesian, #Components=1\n\ 449 x. q.simplex(2)*q.simplex, no modify, standard node based.\n\ 453 Scale factor indices: 1\n\ 456 Scale factor indices: 2\n\ 459 Scale factor indices: 3\n\ 462 Scale factor indices: 4\n\ 465 Scale factor indices: 5\n\ 468 Scale factor indices: 6\n";
475 static const char CmguiAdditionalFieldHeader1D[] =
" field, rectangular cartesian, #Components=1\n\ 476 x. l.Lagrange, no modify, standard node based.\n\ 480 Scale factor indices: 1\n\ 483 Scale factor indices: 2\n";
489 static const char CmguiAdditionalFieldHeader1DQuadratic[] =
" field, rectangular cartesian, #Components=1\n\ 490 x. q.Lagrange, no modify, standard node based.\n\ 494 Scale factor indices: 1\n\ 497 Scale factor indices: 2\n\ 500 Scale factor indices: 3\n";
514 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
590 std::vector<boost::shared_ptr<std::ofstream> >
OpenElementFiles(
bool append =
false);
633 const std::string& rBaseName,
634 bool cleanDirectory=
true);
std::string mAdditionalFieldHeader
out_stream OpenNodeFile(bool append=false)
virtual ~CmguiMeshWriter()
void SetRegionNames(std::vector< std::string > &rRegionNames)
std::string mCoordinatesFileHeader
std::vector< boost::shared_ptr< std::ofstream > > OpenElementFiles(bool append=false)
void WriteElementsFileHeader(std::vector< boost::shared_ptr< std::ofstream > > &rElemFiles)
std::vector< std::string > mRegionNames
std::ios_base::openmode GetOpenMode(bool append)
std::string mElementFileHeader
unsigned mNumNodesPerElement
std::vector< unsigned > mReordering
void SetAdditionalFieldNames(std::vector< std::string > &rFieldNames)
std::vector< std::string > mAdditionalFieldNames
void AppendLocalDataToFiles()
CmguiMeshWriter(const std::string &rDirectory, const std::string &rBaseName, bool cleanDirectory=true)
void WriteNodeFileHeader(out_stream &rpNodeFile)
void CreateFilesWithHeaders()