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

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 41 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 39 of file TrianglesMeshWriter.cpp.

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

Destructor.

Definition at line 48 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 53 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]
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 342 of file TrianglesMeshWriter.cpp.

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
template<class T_DATA , class T_ATTR >
void TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteItem ( out_stream &  pFile,
unsigned  itemNumber,
const std::vector< T_DATA > &  dataPacket,
T_ATTR  attribute 
) [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)
attribute An attribute. Usually unsigned, but double for cable elements

Definition at line 353 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 on Thu Dec 22 13:08:00 2011 for Chaste by  doxygen 1.6.3