Chaste
Release::3.4
|
#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 > | |
void | WriteItem (out_stream &pFile, unsigned itemNumber, const std::vector< T_DATA > &dataPacket, const std::vector< double > &rAttributes) |
template<class T_DATA > | |
void | WriteItem (out_stream &pFile, unsigned itemNumber, const std::vector< T_DATA > &dataPacket) |
virtual | ~TrianglesMeshWriter () |
Public Member Functions inherited from AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM > | |
AbstractTetrahedralMeshWriter (const std::string &rDirectory, const std::string &rBaseName, const bool clearOutputDir=true) | |
virtual | ~AbstractTetrahedralMeshWriter () |
virtual void | WriteFilesUsingMesh (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, bool keepOriginalElementIndexing=true) |
void | WriteFilesUsingMeshReaderAndMesh (AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &rMesh) |
std::vector< double > | GetNextNode () |
ElementData | GetNextElement () |
ElementData | GetNextBoundaryElement () |
ElementData | GetNextCableElement () |
Public Member Functions inherited from AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM > | |
AbstractMeshWriter (const std::string &rDirectory, const std::string &rBaseName, const bool clearOutputDir=true) | |
virtual | ~AbstractMeshWriter () |
std::string | GetOutputDirectory () |
virtual unsigned | GetNumNodes () |
unsigned | GetNumElements () |
unsigned | GetNumBoundaryFaces () |
unsigned | GetNumCableElements () |
void | WriteFilesUsingMeshReader (AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader) |
Additional Inherited Members | |
Protected Attributes inherited from AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM > | |
unsigned | mNodesPerElement |
unsigned | mNodesPerBoundaryElement |
AbstractTetrahedralMesh < ELEMENT_DIM, SPACE_DIM > * | mpMesh |
DistributedTetrahedralMesh < ELEMENT_DIM, SPACE_DIM > * | mpDistributedMesh |
MixedDimensionMesh < ELEMENT_DIM, SPACE_DIM > * | mpMixedMesh |
MeshWriterIterators < ELEMENT_DIM, SPACE_DIM > * | mpIters |
bool | mIndexFromZero |
bool | mWriteMetaFile |
unsigned | mNodeCounterForParallelMesh |
unsigned | mElementCounterForParallelMesh |
unsigned | mBoundaryElementCounterForParallelMesh |
unsigned | mCableElementCounterForParallelMesh |
bool | mFilesAreBinary |
Protected Attributes inherited from AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM > | |
OutputFileHandler * | mpOutputFileHandler |
std::string | mBaseName |
AbstractMeshReader < ELEMENT_DIM, SPACE_DIM > * | mpMeshReader |
unsigned | mNumNodes |
unsigned | mNumElements |
unsigned | mNumBoundaryElements |
unsigned | mNumCableElements |
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 48 of file TrianglesMeshWriter.cpp.
|
virtual |
Destructor.
Definition at line 57 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 62 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 285 of file TrianglesMeshWriter.cpp.
References ElementData::AttributeValue, ChasteBuildInfo::GetProvenanceString(), and ElementData::NodeIndices.
void TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFacesAsEdges | ( | ) |
Write faces as edges (used in the case ELEMENT_DIM==2, SPACE_DIM==3)
Definition at line 332 of file TrianglesMeshWriter.cpp.
References ChasteBuildInfo::GetProvenanceString(), and ElementData::NodeIndices.
|
virtual |
Write mesh data to files.
Implements AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 68 of file TrianglesMeshWriter.cpp.
References ElementData::AttributeValue, GenericEventHandler< 11, MeshEventHandler >::BeginEvent(), GenericEventHandler< 11, MeshEventHandler >::EndEvent(), ChasteBuildInfo::GetProvenanceString(), and ElementData::NodeIndices.
void TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteItem | ( | out_stream & | pFile, |
unsigned | itemNumber, | ||
const std::vector< T_DATA > & | dataPacket, | ||
const std::vector< double > & | rAttributes | ||
) |
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) |
rAttributes | A vector of attributes (double precision). |
Definition at line 389 of file TrianglesMeshWriter.cpp.
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 378 of file TrianglesMeshWriter.cpp.