TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <TrianglesMeshWriter.hpp>

Inherits AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >.

Collaboration diagram for TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >:
Collaboration graph
[legend]

List of all members.

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 ()

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
class TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >

A concrete mesh writer class that writes Triangle output files.

Definition at line 48 of file TrianglesMeshWriter.hpp.


Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::TrianglesMeshWriter ( const std::string &  rDirectory,
const std::string &  rBaseName,
const bool  clearOutputDir = true 
) [inline]

Constructor.

Parameters:
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.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::~TrianglesMeshWriter (  )  [inline, virtual]

Destructor.

Definition at line 57 of file TrianglesMeshWriter.cpp.


Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetWriteFilesAsBinary (  )  [inline]

Switch this mesh write to write binary files

(set to write ascii files in the constructor)

Definition at line 62 of file TrianglesMeshWriter.cpp.

References AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mFilesAreBinary.

Referenced by AbstractTetrahedralMesh< SPACE_DIM, SPACE_DIM >::save().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteElementsAsFaces (  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFacesAsEdges (  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles (  )  [inline, virtual]

Write mesh data to files.

Todo:
#1949 Readers do not currently support reading of node attributes, so we cannot yet write them from a reader
Todo:
#1949
Todo:
#1949 Readers do not currently support reading of node attributes, so we cannot yet write them from a reader
Todo:
#1949 Will deadlock on GetNode(global ID) in parallel since this code is run on the master process
Todo:
#1949
Todo:
#1949

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(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextBoundaryElement(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextCableElement(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumBoundaryFaces(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumCableElements(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), ChasteBuildInfo::GetProvenanceString(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mBaseName, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mFilesAreBinary, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMesh, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpOutputFileHandler, ElementData::NodeIndices, OutputFileHandler::OpenOutputFile(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteElementsAsFaces(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFacesAsEdges(), and TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteItem().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
template<class T_DATA >
void TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteItem ( out_stream &  pFile,
unsigned  itemNumber,
const std::vector< T_DATA > &  dataPacket 
) [inline]

Write a line (ascii format) to a specific file stream Templated over std::vector dataPacket contents of unsigned or doubles.

Parameters:
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.

References TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteItem().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
template<class T_DATA >
void TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteItem ( out_stream &  pFile,
unsigned  itemNumber,
const std::vector< T_DATA > &  dataPacket,
const std::vector< double > &  rAttributes 
) [inline]

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.

Parameters:
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.

References AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mFilesAreBinary.

Referenced by TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteElementsAsFaces(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFacesAsEdges(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), and TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteItem().


The documentation for this class was generated from the following files:

Generated by  doxygen 1.6.2