#include <PottsMeshWriter.hpp>
Inherits AbstractMeshWriter< SPACE_DIM, 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< double > | GetNextNode () |
ElementData | GetNextElement () |
void | WriteFiles () |
Private Attributes | |
PottsMesh< SPACE_DIM > * | mpMesh |
MeshPottsWriterIterators < SPACE_DIM > * | mpIters |
NodeMap * | mpNodeMap |
unsigned | mNodeMapCurrentIndex |
A mesh writer class for potts-based meshes.
Definition at line 47 of file PottsMeshWriter.hpp.
PottsMeshWriter< SPACE_DIM >::PottsMeshWriter | ( | const std::string & | rDirectory, | |
const std::string & | rBaseName, | |||
const bool | clearOutputDir = true | |||
) | [inline] |
Constructor.
rDirectory | reference to the output directory, relative to where Chaste output is stored | |
rBaseName | reference to the base name for results files | |
clearOutputDir | whether to clear the output directory prior to writing files (defaults to true) |
Definition at line 49 of file PottsMeshWriter.cpp.
References PottsMeshWriter< SPACE_DIM >::mpIters.
PottsMeshWriter< SPACE_DIM >::~PottsMeshWriter | ( | ) | [inline] |
Destructor.
Definition at line 63 of file PottsMeshWriter.cpp.
References PottsMeshWriter< SPACE_DIM >::mpIters, and PottsMeshWriter< SPACE_DIM >::mpNodeMap.
ElementData PottsMeshWriter< SPACE_DIM >::GetNextElement | ( | ) | [inline, virtual] |
Reimplemented from AbstractMeshWriter< SPACE_DIM, SPACE_DIM >.
Definition at line 107 of file PottsMeshWriter.cpp.
References NodeMap::GetNewIndex(), PottsMesh< DIM >::GetNumElements(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::IsMeshChanging(), AbstractMeshWriter< SPACE_DIM, SPACE_DIM >::mNumElements, PottsMeshWriter< SPACE_DIM >::mpIters, PottsMeshWriter< SPACE_DIM >::mpMesh, PottsMeshWriter< SPACE_DIM >::mpNodeMap, and ElementData::NodeIndices.
Referenced by PottsMeshWriter< SPACE_DIM >::WriteFiles().
std::vector< double > PottsMeshWriter< SPACE_DIM >::GetNextNode | ( | ) | [inline, virtual] |
Reimplemented from AbstractMeshWriter< SPACE_DIM, SPACE_DIM >.
Definition at line 80 of file PottsMeshWriter.cpp.
References PottsMesh< DIM >::GetNumNodes(), AbstractMeshWriter< SPACE_DIM, SPACE_DIM >::mNumNodes, PottsMeshWriter< SPACE_DIM >::mpIters, and PottsMeshWriter< SPACE_DIM >::mpMesh.
Referenced by PottsMeshWriter< SPACE_DIM >::WriteFiles().
void PottsMeshWriter< SPACE_DIM >::WriteFiles | ( | ) | [inline, virtual] |
Write mesh data to files. This method must be overridden in concrete classes.
Implements AbstractMeshWriter< SPACE_DIM, SPACE_DIM >.
Definition at line 163 of file PottsMeshWriter.cpp.
References ElementData::AttributeValue, PottsMeshWriter< SPACE_DIM >::GetNextElement(), PottsMeshWriter< SPACE_DIM >::GetNextNode(), AbstractMeshWriter< SPACE_DIM, SPACE_DIM >::GetNumElements(), AbstractMeshWriter< SPACE_DIM, SPACE_DIM >::GetNumNodes(), ChasteBuildInfo::GetProvenanceString(), AbstractMeshWriter< SPACE_DIM, SPACE_DIM >::mBaseName, PottsMeshWriter< SPACE_DIM >::mpIters, AbstractMeshWriter< SPACE_DIM, SPACE_DIM >::mpOutputFileHandler, ElementData::NodeIndices, and OutputFileHandler::OpenOutputFile().
Referenced by PottsMeshWriter< SPACE_DIM >::WriteFilesUsingMesh().
void PottsMeshWriter< SPACE_DIM >::WriteFilesUsingMesh | ( | PottsMesh< SPACE_DIM > & | rMesh | ) | [inline] |
Write files using a mesh.
rMesh | reference to the potts-based mesh |
Definition at line 135 of file PottsMeshWriter.cpp.
References PottsMesh< DIM >::GetElementIteratorBegin(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeIteratorBegin(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeIteratorEnd(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumAllNodes(), PottsMesh< DIM >::GetNumElements(), PottsMesh< DIM >::GetNumNodes(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::IsMeshChanging(), PottsMeshWriter< SPACE_DIM >::mNodeMapCurrentIndex, AbstractMeshWriter< SPACE_DIM, SPACE_DIM >::mNumElements, AbstractMeshWriter< SPACE_DIM, SPACE_DIM >::mNumNodes, PottsMeshWriter< SPACE_DIM >::mpIters, PottsMeshWriter< SPACE_DIM >::mpMesh, AbstractMeshWriter< SPACE_DIM, SPACE_DIM >::mpMeshReader, PottsMeshWriter< SPACE_DIM >::mpNodeMap, NodeMap::SetNewIndex(), and PottsMeshWriter< SPACE_DIM >::WriteFiles().
Referenced by PottsMesh< SPACE_DIM >::save().
unsigned PottsMeshWriter< SPACE_DIM >::mNodeMapCurrentIndex [private] |
What was the last index written to mpNodeMap ?
Definition at line 64 of file PottsMeshWriter.hpp.
Referenced by PottsMeshWriter< SPACE_DIM >::WriteFilesUsingMesh().
MeshPottsWriterIterators<SPACE_DIM>* PottsMeshWriter< SPACE_DIM >::mpIters [private] |
Iterators over the mesh
Definition at line 58 of file PottsMeshWriter.hpp.
Referenced by PottsMeshWriter< SPACE_DIM >::GetNextElement(), PottsMeshWriter< SPACE_DIM >::GetNextNode(), PottsMeshWriter< SPACE_DIM >::PottsMeshWriter(), PottsMeshWriter< SPACE_DIM >::WriteFiles(), PottsMeshWriter< SPACE_DIM >::WriteFilesUsingMesh(), and PottsMeshWriter< SPACE_DIM >::~PottsMeshWriter().
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 55 of file PottsMeshWriter.hpp.
Referenced by PottsMeshWriter< SPACE_DIM >::GetNextElement(), PottsMeshWriter< SPACE_DIM >::GetNextNode(), and PottsMeshWriter< SPACE_DIM >::WriteFilesUsingMesh().
NodeMap* PottsMeshWriter< SPACE_DIM >::mpNodeMap [private] |
Track deleted nodes so they don't get written
Definition at line 61 of file PottsMeshWriter.hpp.
Referenced by PottsMeshWriter< SPACE_DIM >::GetNextElement(), PottsMeshWriter< SPACE_DIM >::WriteFilesUsingMesh(), and PottsMeshWriter< SPACE_DIM >::~PottsMeshWriter().