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 >
void WriteItem (out_stream &pFile, unsigned itemNumber, const std::vector< T > &dataPacket, unsigned attribute=UINT_MAX)
virtual ~TrianglesMeshWriter ()

Private Attributes

bool mFilesAreBinary

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 49 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 54 of file TrianglesMeshWriter.cpp.

References TrianglesMeshWriter< 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 >
void TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteItem ( out_stream &  pFile,
unsigned  itemNumber,
const std::vector< T > &  dataPacket,
unsigned  attribute = UINT_MAX 
) [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)
attribute An attribute (defaults to UINT_MAX for no attribute when writing elements as faces)

Definition at line 279 of file TrianglesMeshWriter.cpp.

References TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::mFilesAreBinary.

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


Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::mFilesAreBinary [private]

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

Generated by  doxygen 1.6.2