Chaste
Release::2017.1
|
#include <VertexMeshWriter.hpp>
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 | MakeVtkMesh (VertexMesh< ELEMENT_DIM, SPACE_DIM > &rMesh) |
void | AddCellData (std::string dataName, std::vector< double > dataPayload) |
void | AddPointData (std::string dataName, std::vector< double > dataPayload) |
std::vector< double > | GetNextNode () |
ElementData | GetNextElement () |
VertexElementData | GetNextElementWithFaces () |
void | WriteFiles () |
template<> | |
void | WriteVtkUsingMesh (VertexMesh< 2, 2 > &rMesh, std::string stamp) |
Public Member Functions inherited from AbstractMeshWriter< ELEMENT_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 | |
VertexMesh< ELEMENT_DIM, SPACE_DIM > * | mpMesh |
MeshWriterIterators< ELEMENT_DIM, SPACE_DIM > * | mpIters |
NodeMap * | mpNodeMap |
unsigned | mNodeMapCurrentIndex |
vtkUnstructuredGrid * | mpVtkUnstructedMesh |
Additional Inherited Members | |
Protected Attributes inherited from AbstractMeshWriter< ELEMENT_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 vertex-based meshes.
Definition at line 40 of file MutableVertexMesh.hpp.
VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::VertexMeshWriter | ( | 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 |
Definition at line 58 of file VertexMeshWriter.cpp.
References VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpIters, and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructedMesh.
VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::~VertexMeshWriter | ( | ) |
Destructor.
Definition at line 77 of file VertexMeshWriter.cpp.
References VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpIters, VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpNodeMap, and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructedMesh.
void VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::AddCellData | ( | std::string | dataName, |
std::vector< double > | dataPayload | ||
) |
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 350 of file VertexMeshWriter.cpp.
References VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructedMesh.
Referenced by VertexBasedCellPopulation< DIM >::WriteVtkResultsToFile(), MeshBasedCellPopulationWithGhostNodes< DIM >::WriteVtkResultsToFile(), and MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::WriteVtkResultsToFile().
void VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::AddPointData | ( | std::string | dataName, |
std::vector< double > | dataPayload | ||
) |
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 367 of file VertexMeshWriter.cpp.
References VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructedMesh.
|
virtual |
Reimplemented from AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 179 of file VertexMeshWriter.cpp.
References NodeMap::GetNewIndex(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), 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().
VertexElementData VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElementWithFaces | ( | ) |
Definition at line 126 of file VertexMeshWriter.cpp.
References ElementData::AttributeValue, VertexElement< ELEMENT_DIM, SPACE_DIM >::GetFace(), 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, VertexElementData::NodeIndices, and ElementData::NodeIndices.
Referenced by VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().
|
virtual |
Reimplemented from AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 99 of file VertexMeshWriter.cpp.
References AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), 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 >::MakeVtkMesh | ( | VertexMesh< ELEMENT_DIM, SPACE_DIM > & | rMesh | ) |
Populate mpVtkUnstructedMesh using a vertex-based mesh. Called by WriteVtkUsingMesh().
rMesh | reference to the vertex-based mesh |
Definition at line 303 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(), and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructedMesh.
Referenced by VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteVtkUsingMesh().
|
virtual |
Write mesh data to files. This method must be overridden in concrete classes.
Implements AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 413 of file VertexMeshWriter.cpp.
References VertexElementData::AttributeValue, ElementData::AttributeValue, VertexElementData::Faces, VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElementWithFaces(), 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, VertexElementData::NodeIndices, 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 | ) |
Write files using a mesh.
rMesh | reference to the vertex-based mesh |
Definition at line 385 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< DIM, DIM >::save(), and PottsBasedCellPopulation< DIM >::WriteVtkResultsToFile().
void VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteVtkUsingMesh | ( | VertexMesh< ELEMENT_DIM, SPACE_DIM > & | rMesh, |
std::string | stamp = "" |
||
) |
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 208 of file VertexMeshWriter.cpp.
References OutputFileHandler::GetOutputDirectoryFullPath(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::MakeVtkMesh(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mBaseName, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpOutputFileHandler, and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructedMesh.
Referenced by VertexBasedCellPopulation< DIM >::WriteVtkResultsToFile(), PottsBasedCellPopulation< DIM >::WriteVtkResultsToFile(), MeshBasedCellPopulationWithGhostNodes< DIM >::WriteVtkResultsToFile(), and MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::WriteVtkResultsToFile().
void VertexMeshWriter< 2, 2 >::WriteVtkUsingMesh | ( | VertexMesh< 2, 2 > & | rMesh, |
std::string | stamp | ||
) |
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 250 of file VertexMeshWriter.cpp.
References OutputFileHandler::GetOutputDirectoryFullPath(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::MakeVtkMesh(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mBaseName, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpOutputFileHandler, and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructedMesh.
|
private |
What was the last index written to mpNodeMap ?
Definition at line 86 of file VertexMeshWriter.hpp.
Referenced by VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().
|
private |
Iterators over the mesh
Definition at line 81 of file VertexMeshWriter.hpp.
Referenced by VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElementWithFaces(), 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().
|
private |
If writing from a mesh object, the mesh to write to disk. Otherwise NULL.
Definition at line 78 of file VertexMeshWriter.hpp.
Referenced by VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElementWithFaces(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().
|
private |
Track deleted nodes so they don't get written
Definition at line 84 of file VertexMeshWriter.hpp.
Referenced by VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElementWithFaces(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::~VertexMeshWriter().
|
private |
Definition at line 91 of file VertexMeshWriter.hpp.
Referenced by VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::AddCellData(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::AddPointData(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::MakeVtkMesh(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::VertexMeshWriter(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteVtkUsingMesh(), and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::~VertexMeshWriter().