36#ifndef CMGUIWRITER_HPP_
37#define CMGUIWRITER_HPP_
39#include "AbstractTetrahedralMeshWriter.hpp"
40#include "OutputFileHandler.hpp"
45static constexpr char CmguiNodeFileHeader3D[] = R
"( #Fields=1
46 1) coordinates, coordinate, rectangular cartesian, #Components=3
47 x. Value index= 1, #Derivatives= 0
48 y. Value index= 2, #Derivatives= 0
49 z. Value index= 3, #Derivatives= 0
55static constexpr char CmguiNodeFileHeader2D[] = R
"( #Fields=1
56 1) coordinates, coordinate, rectangular cartesian, #Components=2
57 x. Value index= 1, #Derivatives= 0
58 y. Value index= 2, #Derivatives= 0
65static constexpr char CmguiNodeFileHeader1D[] = R
"( #Fields=1
66 1) coordinates, coordinate, rectangular cartesian, #Components=1
67 x. Value index= 1, #Derivatives= 0
73static constexpr char CmguiElementFileHeader3D[] = R
"(Shape. Dimension=3, simplex(2;3)*simplex*simplex
81static constexpr char CmguiElementFileHeader3DQuadratic[] = R
"(Shape. Dimension=3, simplex(2;3)*simplex*simplex
90static constexpr char CmguiElementFileHeader2D[] = R
"(Shape. Dimension=2, simplex(2)*simplex
98static constexpr char CmguiElementFileHeader2DQuadratic[] = R
"(Shape. Dimension=2, simplex(2)*simplex
106static constexpr char CmguiElementFileHeader1D[] = R
"(Shape. Dimension=1, line
107 #Scale factor sets= 0
114static constexpr char CmguiElementFileHeader1DQuadratic[] = R
"(Shape. Dimension=1, line
115 #Scale factor sets= 0
123static constexpr char CmguiCoordinatesFileHeader3D[] = R
"( 1) coordinates, coordinate, rectangular cartesian, #Components=3
124 x. l.simplex(2;3)*l.simplex*l.simplex, no modify, standard node based.
128 Scale factor indices: 1
131 Scale factor indices: 2
134 Scale factor indices: 3
137 Scale factor indices: 4
138 y. l.simplex(2;3)*l.simplex*l.simplex, no modify, standard node based.
142 Scale factor indices: 1
145 Scale factor indices: 2
148 Scale factor indices: 3
151 Scale factor indices: 4
152 z. l.simplex(2;3)*l.simplex*l.simplex, no modify, standard node based.
156 Scale factor indices: 1
159 Scale factor indices: 2
162 Scale factor indices: 3
165 Scale factor indices: 4
172static constexpr char CmguiCoordinatesFileHeader3DQuadratic[] = R
"( 1) coordinates, coordinate, rectangular cartesian, #Components=3
173 x. q.simplex(2;3)*q.simplex*q.simplex, no modify, standard node based.
177 Scale factor indices: 1
180 Scale factor indices: 2
183 Scale factor indices: 3
186 Scale factor indices: 4
189 Scale factor indices: 5
192 Scale factor indices: 6
195 Scale factor indices: 7
198 Scale factor indices: 8
201 Scale factor indices: 9
204 Scale factor indices: 10
205 y. q.simplex(2;3)*q.simplex*q.simplex, no modify, standard node based.
209 Scale factor indices: 1
212 Scale factor indices: 2
215 Scale factor indices: 3
218 Scale factor indices: 4
221 Scale factor indices: 5
224 Scale factor indices: 6
227 Scale factor indices: 7
230 Scale factor indices: 8
233 Scale factor indices: 9
236 Scale factor indices: 10
237 z. q.simplex(2;3)*q.simplex*q.simplex, no modify, standard node based.
241 Scale factor indices: 1
244 Scale factor indices: 2
247 Scale factor indices: 3
250 Scale factor indices: 4
253 Scale factor indices: 5
256 Scale factor indices: 6
259 Scale factor indices: 7
262 Scale factor indices: 8
265 Scale factor indices: 9
268 Scale factor indices: 10
275static constexpr char CmguiCoordinatesFileHeader2D[] = R
"( 1) coordinates, coordinate, rectangular cartesian, #Components=2
276 x. l.simplex(2)*l.simplex, no modify, standard node based.
280 Scale factor indices: 1
283 Scale factor indices: 2
286 Scale factor indices: 3
287 y. l.simplex(2)*l.simplex, no modify, standard node based.
291 Scale factor indices: 1
294 Scale factor indices: 2
297 Scale factor indices: 3
305static constexpr char CmguiCoordinatesFileHeader2DQuadratic[] = R
"( 1) coordinates, coordinate, rectangular cartesian, #Components=2
306 x. q.simplex(2)*q.simplex, no modify, standard node based.
310 Scale factor indices: 1
313 Scale factor indices: 2
316 Scale factor indices: 3
319 Scale factor indices: 4
322 Scale factor indices: 5
325 Scale factor indices: 6
326 y. q.simplex(2)*q.simplex, no modify, standard node based.
330 Scale factor indices: 1
333 Scale factor indices: 2
336 Scale factor indices: 3
339 Scale factor indices: 4
342 Scale factor indices: 5
345 Scale factor indices: 6
352static constexpr char CmguiCoordinatesFileHeader1D[] = R
"( 1) coordinates, coordinate, rectangular cartesian, #Components=1
353 x. l.Lagrange, no modify, standard node based.
357 Scale factor indices: 1
360 Scale factor indices: 2
368static constexpr char CmguiCoordinatesFileHeader1DQuadratic[] = R
"( 1) coordinates, coordinate, rectangular cartesian, #Components=1
369 x. q.Lagrange, no modify, standard node based.
373 Scale factor indices: 1
376 Scale factor indices: 2
379 Scale factor indices: 3
386static constexpr char CmguiAdditionalFieldHeader3D[] = R
"( field, rectangular cartesian, #Components=1
387 x. l.simplex(2;3)*l.simplex*l.simplex, no modify, standard node based.
391 Scale factor indices: 1
394 Scale factor indices: 2
397 Scale factor indices: 3
400 Scale factor indices: 4
409static constexpr char CmguiAdditionalFieldHeader3DQuadratic[] = R
"( field, rectangular cartesian, #Components=1
410 x. q.simplex(2;3)*q.simplex*q.simplex, no modify, standard node based.
414 Scale factor indices: 1
417 Scale factor indices: 2
420 Scale factor indices: 3
423 Scale factor indices: 4
426 Scale factor indices: 5
429 Scale factor indices: 6
432 Scale factor indices: 7
435 Scale factor indices: 8
438 Scale factor indices: 9
441 Scale factor indices: 10
448static constexpr char CmguiAdditionalFieldHeader2D[] = R
"( field, rectangular cartesian, #Components=1
449 x. l.simplex(2)*l.simplex, no modify, standard node based.
453 Scale factor indices: 1
456 Scale factor indices: 2
459 Scale factor indices: 3
466static constexpr char CmguiAdditionalFieldHeader2DQuadratic[] = R
"( field, rectangular cartesian, #Components=1
467 x. q.simplex(2)*q.simplex, no modify, standard node based.
471 Scale factor indices: 1
474 Scale factor indices: 2
477 Scale factor indices: 3
480 Scale factor indices: 4
483 Scale factor indices: 5
486 Scale factor indices: 6
494static constexpr char CmguiAdditionalFieldHeader1D[] = R
"( field, rectangular cartesian, #Components=1
495 x. l.Lagrange, no modify, standard node based.
499 Scale factor indices: 1
502 Scale factor indices: 2
509static constexpr char CmguiAdditionalFieldHeader1DQuadratic[] = R
"( field, rectangular cartesian, #Components=1
510 x. q.Lagrange, no modify, standard node based.
514 Scale factor indices: 1
517 Scale factor indices: 2
520 Scale factor indices: 3
534template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
609 std::vector<boost::shared_ptr<std::ofstream> >
OpenElementFiles(
bool append =
false);
652 const std::string& rBaseName,
653 bool cleanDirectory=
true);
std::string mElementFileHeader
std::vector< std::string > mRegionNames
void WriteElementsFileHeader(std::vector< boost::shared_ptr< std::ofstream > > &rElemFiles)
std::vector< boost::shared_ptr< std::ofstream > > OpenElementFiles(bool append=false)
std::ios_base::openmode GetOpenMode(bool append)
std::vector< unsigned > mReordering
void SetAdditionalFieldNames(std::vector< std::string > &rFieldNames)
unsigned mNumNodesPerElement
void AppendLocalDataToFiles()
std::string mAdditionalFieldHeader
void CreateFilesWithHeaders()
std::vector< std::string > mAdditionalFieldNames
virtual ~CmguiMeshWriter()
void WriteNodeFileHeader(out_stream &rpNodeFile)
out_stream OpenNodeFile(bool append=false)
void SetRegionNames(std::vector< std::string > &rRegionNames)
std::string mCoordinatesFileHeader