Chaste Release::3.1
|
#include <TrianglesMeshWriter.hpp>
Public Member Functions | |
TrianglesMeshWriter (const std::string &rDirectory, const std::string &rBaseName, const bool clearOutputDir=true) | |
void | SetWriteFilesAsBinary () |
void | WriteFiles () |
void | WriteElementsAsFaces () |
void | WriteFacesAsEdges () |
template<class T_DATA , class T_ATTR > | |
void | WriteItem (out_stream &pFile, unsigned itemNumber, const std::vector< T_DATA > &dataPacket, T_ATTR attribute) |
template<class T_DATA > | |
void | WriteItem (out_stream &pFile, unsigned itemNumber, const std::vector< T_DATA > &dataPacket) |
virtual | ~TrianglesMeshWriter () |
A concrete mesh writer class that writes Triangle output files.
Definition at line 48 of file TrianglesMeshWriter.hpp.
TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::TrianglesMeshWriter | ( | const std::string & | rDirectory, |
const std::string & | rBaseName, | ||
const bool | clearOutputDir = true |
||
) |
Constructor.
rDirectory | the directory in which to write the mesh to file |
rBaseName | the base name of the files in which to write the mesh data |
clearOutputDir | whether to clean the directory (defaults to true) |
Definition at line 46 of file TrianglesMeshWriter.cpp.
TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::~TrianglesMeshWriter | ( | ) | [virtual] |
Destructor.
Definition at line 55 of file TrianglesMeshWriter.cpp.
void TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetWriteFilesAsBinary | ( | ) |
Switch this mesh write to write binary files
(set to write ascii files in the constructor)
Definition at line 60 of file TrianglesMeshWriter.cpp.
Referenced by AbstractTetrahedralMesh< SPACE_DIM, SPACE_DIM >::save().
void TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteElementsAsFaces | ( | ) |
Write elements as faces (used in the case ELEMENT_DIM== SPACE_DIM-1)
Definition at line 260 of file TrianglesMeshWriter.cpp.
References ChasteBuildInfo::GetProvenanceString().
void TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFacesAsEdges | ( | ) |
Write faces as edges (used in the case ELEMENT_DIM==2, SPACE_DIM==3)
Definition at line 303 of file TrianglesMeshWriter.cpp.
References ChasteBuildInfo::GetProvenanceString(), and ElementData::NodeIndices.
void TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles | ( | ) | [virtual] |
Write mesh data to files.
Implements AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 66 of file TrianglesMeshWriter.cpp.
References ElementData::AttributeValue, ChasteBuildInfo::GetProvenanceString(), and ElementData::NodeIndices.
void TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteItem | ( | out_stream & | pFile, |
unsigned | itemNumber, | ||
const std::vector< T_DATA > & | dataPacket | ||
) |
Write a line (ascii format) to a specific file stream Templated over std::vector dataPacket contents of unsigned or doubles.
pFile | Pointer to file stream |
itemNumber | Index of the element, node or face |
dataPacket | List of unsigneds (for node indices) or doubles (for node locations) |
Definition at line 349 of file TrianglesMeshWriter.cpp.
void TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteItem | ( | out_stream & | pFile, |
unsigned | itemNumber, | ||
const std::vector< T_DATA > & | dataPacket, | ||
T_ATTR | attribute | ||
) |
Write a line (ascii format) to a specific file stream Templated over std::vector dataPacket contents of unsigned or doubles. Templated over type of attribute.
pFile | Pointer to file stream |
itemNumber | Index of the element, node or face |
dataPacket | List of unsigneds (for node indices) or doubles (for node locations) |
attribute | An attribute. Usually unsigned, but double for cable elements |
Definition at line 360 of file TrianglesMeshWriter.cpp.