Chaste
Release::2017.1
|
#include <PottsMeshWriter.hpp>
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 () |
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 |
NodeMap * | mpNodeMap |
unsigned | mNodeMapCurrentIndex |
Additional Inherited Members | |
Protected Attributes inherited from AbstractMeshWriter< SPACE_DIM, SPACE_DIM > | |
OutputFileHandler * | mpOutputFileHandler |
std::string | mBaseName |
AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > * | mpMeshReader |
unsigned | mNumNodes |
unsigned | mNumElements |
unsigned | mNumBoundaryElements |
unsigned | mNumCableElements |
A mesh writer class for Potts meshes.
Definition at line 41 of file PottsMesh.hpp.
PottsMeshWriter< SPACE_DIM >::PottsMeshWriter | ( | const std::string & | rDirectory, |
const std::string & | rBaseName, | ||
const bool | clearOutputDir = true |
||
) |
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 56 of file PottsMeshWriter.cpp.
References PottsMeshWriter< SPACE_DIM >::mpIters.
PottsMeshWriter< SPACE_DIM >::~PottsMeshWriter | ( | ) |
Destructor.
Definition at line 70 of file PottsMeshWriter.cpp.
References PottsMeshWriter< SPACE_DIM >::mpIters, and PottsMeshWriter< SPACE_DIM >::mpNodeMap.
|
virtual |
Reimplemented from AbstractMeshWriter< SPACE_DIM, SPACE_DIM >.
Definition at line 114 of file PottsMeshWriter.cpp.
References NodeMap::GetNewIndex(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), 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().
|
virtual |
Reimplemented from AbstractMeshWriter< SPACE_DIM, SPACE_DIM >.
Definition at line 87 of file PottsMeshWriter.cpp.
References AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), PottsMesh< DIM >::GetNumNodes(), AbstractMeshWriter< SPACE_DIM, SPACE_DIM >::mNumNodes, PottsMeshWriter< SPACE_DIM >::mpIters, and PottsMeshWriter< SPACE_DIM >::mpMesh.
Referenced by 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, 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, 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 | ) |
Write files using a mesh.
rMesh | reference to the Potts mesh |
Definition at line 142 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().
|
private |
What was the last index written to mpNodeMap ?
Definition at line 71 of file PottsMeshWriter.hpp.
Referenced by PottsMeshWriter< SPACE_DIM >::WriteFilesUsingMesh().
|
private |
Iterators over the mesh
Definition at line 65 of file PottsMeshWriter.hpp.
Referenced by PottsMeshWriter< SPACE_DIM >::GetNextElement(), PottsMeshWriter< SPACE_DIM >::GetNextNode(), PottsMeshWriter< SPACE_DIM >::PottsMeshWriter(), PottsMeshWriter< SPACE_DIM >::WriteFilesUsingMesh(), and PottsMeshWriter< SPACE_DIM >::~PottsMeshWriter().
|
private |
If writing from a mesh object, the mesh to write to disk. Otherwise NULL.
Definition at line 62 of file PottsMeshWriter.hpp.
Referenced by PottsMeshWriter< SPACE_DIM >::GetNextElement(), PottsMeshWriter< SPACE_DIM >::GetNextNode(), and PottsMeshWriter< SPACE_DIM >::WriteFilesUsingMesh().
|
private |
Track deleted nodes so they don't get written
Definition at line 68 of file PottsMeshWriter.hpp.
Referenced by PottsMeshWriter< SPACE_DIM >::GetNextElement(), PottsMeshWriter< SPACE_DIM >::WriteFilesUsingMesh(), and PottsMeshWriter< SPACE_DIM >::~PottsMeshWriter().