Chaste Release::3.1
TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <TrianglesMeshWriter.hpp>

Inheritance diagram for TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >:
Collaboration diagram for TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >:

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

Constructor.

Parameters:
rDirectorythe directory in which to write the mesh to file
rBaseNamethe base name of the files in which to write the mesh data
clearOutputDirwhether to clean the directory (defaults to true)

Definition at line 46 of file TrianglesMeshWriter.cpp.

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

Destructor.

Definition at line 55 of file TrianglesMeshWriter.cpp.


Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
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().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
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().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
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.

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

Write mesh data to files.

Todo:
#1949
Todo:
#1899 or #1949 Is this necessary?
Todo:
#1949
Todo:
#1949
Todo:
#1949

Implements AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >.

Definition at line 66 of file TrianglesMeshWriter.cpp.

References ElementData::AttributeValue, ChasteBuildInfo::GetProvenanceString(), and ElementData::NodeIndices.

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 
)

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

Parameters:
pFilePointer to file stream
itemNumberIndex of the element, node or face
dataPacketList of unsigneds (for node indices) or doubles (for node locations)

Definition at line 349 of file TrianglesMeshWriter.cpp.

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 
)

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:
pFilePointer to file stream
itemNumberIndex of the element, node or face
dataPacketList of unsigneds (for node indices) or doubles (for node locations)
attributeAn attribute. Usually unsigned, but double for cable elements

Definition at line 360 of file TrianglesMeshWriter.cpp.


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