Chaste Release::3.1
SemMeshWriter< SPACE_DIM > Class Template Reference

#include <SemMeshWriter.hpp>

Inheritance diagram for SemMeshWriter< SPACE_DIM >:
Collaboration diagram for SemMeshWriter< SPACE_DIM >:

List of all members.

Public Member Functions

 SemMeshWriter (const std::string &rDirectory, const std::string &rBaseName, const bool clearOutputDir=true)
 ~SemMeshWriter ()
void WriteFilesUsingMesh (SemMesh< SPACE_DIM > &rMesh)
std::vector< doubleGetNextNode ()
ElementData GetNextElement ()
void WriteFiles ()

Private Attributes

SemMesh< SPACE_DIM > * mpMesh
MeshSemWriterIterators
< SPACE_DIM > * 
mpIters
NodeMapmpNodeMap
unsigned mNodeMapCurrentIndex

Detailed Description

template<unsigned SPACE_DIM>
class SemMeshWriter< SPACE_DIM >

A mesh writer class for potts-based meshes.

Definition at line 54 of file SemMeshWriter.hpp.


Constructor & Destructor Documentation

template<unsigned SPACE_DIM>
SemMeshWriter< SPACE_DIM >::SemMeshWriter ( const std::string &  rDirectory,
const std::string &  rBaseName,
const bool  clearOutputDir = true 
)

Constructor.

Parameters:
rDirectoryreference to the output directory, relative to where Chaste output is stored
rBaseNamereference to the base name for results files
clearOutputDirwhether to clear the output directory prior to writing files (defaults to true)

Definition at line 56 of file SemMeshWriter.cpp.

References SemMeshWriter< SPACE_DIM >::mpIters.

template<unsigned SPACE_DIM>
SemMeshWriter< SPACE_DIM >::~SemMeshWriter ( )

Destructor.

Definition at line 70 of file SemMeshWriter.cpp.


Member Function Documentation

template<unsigned SPACE_DIM>
ElementData SemMeshWriter< SPACE_DIM >::GetNextElement ( ) [virtual]
Returns:
the data (indices/attributes) of the next element to be written to file

Reimplemented from AbstractMeshWriter< SPACE_DIM, SPACE_DIM >.

Definition at line 114 of file SemMeshWriter.cpp.

References AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), and ElementData::NodeIndices.

template<unsigned SPACE_DIM>
std::vector< double > SemMeshWriter< SPACE_DIM >::GetNextNode ( ) [virtual]
Returns:
the coordinates of the next node to be written to file

Reimplemented from AbstractMeshWriter< SPACE_DIM, SPACE_DIM >.

Definition at line 87 of file SemMeshWriter.cpp.

References AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode().

template<unsigned SPACE_DIM>
void SemMeshWriter< SPACE_DIM >::WriteFiles ( ) [virtual]

Write mesh data to files. This method must be overridden in concrete classes.

Todo:
#2146 - this looks like a bug in the making - what if the attribute IS zero!?!?

Implements AbstractMeshWriter< SPACE_DIM, SPACE_DIM >.

Definition at line 170 of file SemMeshWriter.cpp.

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

template<unsigned SPACE_DIM>
void SemMeshWriter< SPACE_DIM >::WriteFilesUsingMesh ( SemMesh< SPACE_DIM > &  rMesh)
Todo:
Mesh should be const (#1076)

Write files using a mesh.

Parameters:
rMeshreference to the potts-based mesh
Todo:
Mesh should be const (#1663)

Definition at line 142 of file SemMeshWriter.cpp.

References SemMesh< DIM >::GetNumNodes(), and NodeMap::SetNewIndex().

Referenced by SemMesh< SPACE_DIM >::save().


Member Data Documentation

template<unsigned SPACE_DIM>
unsigned SemMeshWriter< SPACE_DIM >::mNodeMapCurrentIndex [private]

What was the last index written to mpNodeMap ?

Definition at line 71 of file SemMeshWriter.hpp.

template<unsigned SPACE_DIM>
MeshSemWriterIterators<SPACE_DIM>* SemMeshWriter< SPACE_DIM >::mpIters [private]

Iterators over the mesh

Definition at line 65 of file SemMeshWriter.hpp.

Referenced by SemMeshWriter< SPACE_DIM >::SemMeshWriter().

template<unsigned SPACE_DIM>
SemMesh<SPACE_DIM>* SemMeshWriter< SPACE_DIM >::mpMesh [private]

If writing from a mesh object, the mesh to write to disk. Otherwise NULL.

Definition at line 62 of file SemMeshWriter.hpp.

template<unsigned SPACE_DIM>
NodeMap* SemMeshWriter< SPACE_DIM >::mpNodeMap [private]

Track deleted nodes so they don't get written

Definition at line 68 of file SemMeshWriter.hpp.


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