Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
PottsMeshWriter< SPACE_DIM > Class Template Reference

#include <PottsMeshWriter.hpp>

+ Inheritance diagram for PottsMeshWriter< SPACE_DIM >:
+ Collaboration diagram for PottsMeshWriter< SPACE_DIM >:

Public Member Functions

 PottsMeshWriter (const std::string &rDirectory, const std::string &rBaseName, const bool clearOutputDir=true)
 
 ~PottsMeshWriter ()
 
void WriteFilesUsingMesh (PottsMesh< SPACE_DIM > &rMesh)
 
std::vector< doubleGetNextNode ()
 
ElementData GetNextElement ()
 
void WriteFiles ()
 
- Public Member Functions inherited from AbstractMeshWriter< SPACE_DIM, SPACE_DIM >
 AbstractMeshWriter (const std::string &rDirectory, const std::string &rBaseName, const bool clearOutputDir=true)
 
virtual ~AbstractMeshWriter ()
 
std::string GetOutputDirectory ()
 
virtual unsigned GetNumNodes ()
 
unsigned GetNumElements ()
 
unsigned GetNumBoundaryFaces ()
 
unsigned GetNumCableElements ()
 
virtual ElementData GetNextBoundaryElement ()
 
virtual ElementData GetNextCableElement ()
 
void WriteFilesUsingMeshReader (AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader)
 

Private Attributes

PottsMesh< SPACE_DIM > * mpMesh
 
MeshPottsWriterIterators< SPACE_DIM > * mpIters
 
NodeMapmpNodeMap
 
unsigned mNodeMapCurrentIndex
 

Additional Inherited Members

- Protected Attributes inherited from AbstractMeshWriter< SPACE_DIM, SPACE_DIM >
OutputFileHandlermpOutputFileHandler
 
std::string mBaseName
 
AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > * mpMeshReader
 
unsigned mNumNodes
 
unsigned mNumElements
 
unsigned mNumBoundaryElements
 
unsigned mNumCableElements
 

Detailed Description

template<unsigned SPACE_DIM>
class PottsMeshWriter< SPACE_DIM >

A mesh writer class for Potts meshes.

Definition at line 54 of file PottsMeshWriter.hpp.

Constructor & Destructor Documentation

◆ PottsMeshWriter()

template<unsigned SPACE_DIM>
PottsMeshWriter< SPACE_DIM >::PottsMeshWriter ( 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 PottsMeshWriter.cpp.

References PottsMeshWriter< SPACE_DIM >::mpIters.

◆ ~PottsMeshWriter()

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

Destructor.

Definition at line 70 of file PottsMeshWriter.cpp.

Member Function Documentation

◆ GetNextElement()

template<unsigned SPACE_DIM>
ElementData PottsMeshWriter< 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 PottsMeshWriter.cpp.

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

◆ GetNextNode()

template<unsigned SPACE_DIM>
std::vector< double > PottsMeshWriter< 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 PottsMeshWriter.cpp.

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

◆ WriteFiles()

template<unsigned SPACE_DIM>
void PottsMeshWriter< SPACE_DIM >::WriteFiles ( )
virtual

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

Implements AbstractMeshWriter< SPACE_DIM, SPACE_DIM >.

Definition at line 171 of file PottsMeshWriter.cpp.

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

◆ WriteFilesUsingMesh()

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

Write files using a mesh.

Parameters
rMeshreference to the Potts mesh
Todo:
Mesh should be const (#1663)

Definition at line 142 of file PottsMeshWriter.cpp.

References PottsMesh< DIM >::GetNumNodes().

Referenced by PottsMesh< DIM >::save().

Member Data Documentation

◆ mNodeMapCurrentIndex

template<unsigned SPACE_DIM>
unsigned PottsMeshWriter< SPACE_DIM >::mNodeMapCurrentIndex
private

What was the last index written to mpNodeMap ?

Definition at line 71 of file PottsMeshWriter.hpp.

◆ mpIters

template<unsigned SPACE_DIM>
MeshPottsWriterIterators<SPACE_DIM>* PottsMeshWriter< SPACE_DIM >::mpIters
private

Iterators over the mesh

Definition at line 65 of file PottsMeshWriter.hpp.

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

◆ mpMesh

template<unsigned SPACE_DIM>
PottsMesh<SPACE_DIM>* PottsMeshWriter< SPACE_DIM >::mpMesh
private

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

Definition at line 62 of file PottsMeshWriter.hpp.

◆ mpNodeMap

template<unsigned SPACE_DIM>
NodeMap* PottsMeshWriter< SPACE_DIM >::mpNodeMap
private

Track deleted nodes so they don't get written

Definition at line 68 of file PottsMeshWriter.hpp.


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