#include <VertexMeshWriter.hpp>
Inherits AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Public Member Functions | |
VertexMeshWriter (const std::string &rDirectory, const std::string &rBaseName, const bool clearOutputDir=true) | |
~VertexMeshWriter () | |
void | WriteFilesUsingMesh (VertexMesh< ELEMENT_DIM, SPACE_DIM > &rMesh) |
void | WriteVtkUsingMesh (VertexMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, std::string stamp="") |
void | AddCellData (std::string dataName, std::vector< double > dataPayload) |
void | AddPointData (std::string dataName, std::vector< double > dataPayload) |
std::vector< double > | GetNextNode () |
ElementData | GetNextElement () |
void | WriteFiles () |
Private Attributes | |
VertexMesh< ELEMENT_DIM, SPACE_DIM > * | mpMesh |
MeshWriterIterators < ELEMENT_DIM, SPACE_DIM > * | mpIters |
NodeMap * | mpNodeMap |
unsigned | mNodeMapCurrentIndex |
A mesh writer class for vertex-based meshes.
Definition at line 64 of file VertexMeshWriter.hpp.
VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::VertexMeshWriter | ( | 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 |
Definition at line 49 of file VertexMeshWriter.cpp.
References VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpIters.
VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::~VertexMeshWriter | ( | ) | [inline] |
Destructor.
Definition at line 69 of file VertexMeshWriter.cpp.
References VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpIters, and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpNodeMap.
void VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::AddCellData | ( | std::string | dataName, | |
std::vector< double > | dataPayload | |||
) | [inline] |
Add data to a future VTK file.
dataName | a tag to go into the VTK file | |
dataPayload | a pay-load of length (number of elements) |
Definition at line 214 of file VertexMeshWriter.cpp.
void VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::AddPointData | ( | std::string | dataName, | |
std::vector< double > | dataPayload | |||
) | [inline] |
Add data to a future VTK file.
dataName | a tag to go into the VTK file | |
dataPayload | a pay-load of length (number of nodes) |
Definition at line 232 of file VertexMeshWriter.cpp.
ElementData VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement | ( | ) | [inline, virtual] |
Reimplemented from AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 117 of file VertexMeshWriter.cpp.
References NodeMap::GetNewIndex(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumElements, VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpIters, VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMesh, VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpNodeMap, and ElementData::NodeIndices.
Referenced by VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().
std::vector< double > VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode | ( | ) | [inline, virtual] |
Reimplemented from AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 92 of file VertexMeshWriter.cpp.
References AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumNodes, VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpIters, and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMesh.
Referenced by VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().
void VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles | ( | ) | [inline, virtual] |
Write mesh data to files. This method must be overridden in concrete classes.
Implements AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 279 of file VertexMeshWriter.cpp.
References VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), ChasteBuildInfo::GetProvenanceString(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mBaseName, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpOutputFileHandler, ElementData::NodeIndices, and OutputFileHandler::OpenOutputFile().
Referenced by VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().
void VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh | ( | VertexMesh< ELEMENT_DIM, SPACE_DIM > & | rMesh | ) | [inline] |
Write files using a mesh.
rMesh | reference to the vertex-based mesh |
Definition at line 249 of file VertexMeshWriter.cpp.
References VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNodeMapCurrentIndex, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumElements, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumNodes, VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpIters, VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMesh, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMeshReader, VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpNodeMap, NodeMap::SetNewIndex(), and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().
Referenced by VertexMesh< 2, 2 >::save().
void VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteVtkUsingMesh | ( | VertexMesh< ELEMENT_DIM, SPACE_DIM > & | rMesh, | |
std::string | stamp = "" | |||
) | [inline] |
Write VTK file using a mesh.
rMesh | reference to the vertex-based mesh | |
stamp | is an optional stamp (like a time-stamp) to put into the name of the file |
Definition at line 143 of file VertexMeshWriter.cpp.
References VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorBegin(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorEnd(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), OutputFileHandler::GetOutputDirectoryFullPath(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mBaseName, and AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpOutputFileHandler.
unsigned VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNodeMapCurrentIndex [private] |
What was the last index written to mpNodeMap ?
Definition at line 79 of file VertexMeshWriter.hpp.
Referenced by VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().
MeshWriterIterators<ELEMENT_DIM,SPACE_DIM>* VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpIters [private] |
Iterators over the mesh
Definition at line 74 of file VertexMeshWriter.hpp.
Referenced by VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::VertexMeshWriter(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::~VertexMeshWriter().
VertexMesh<ELEMENT_DIM,SPACE_DIM>* VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMesh [private] |
If writing from a mesh object, the mesh to write to disk. Otherwise NULL.
Definition at line 71 of file VertexMeshWriter.hpp.
Referenced by VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().
NodeMap* VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpNodeMap [private] |
Track deleted nodes so they don't get written
Definition at line 77 of file VertexMeshWriter.hpp.
Referenced by VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::~VertexMeshWriter().