#include <AbstractMeshWriter.hpp>
Inherited by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >, and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Public Member Functions | |
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 std::vector< double > | GetNextNode () |
virtual ElementData | GetNextElement () |
virtual ElementData | GetNextBoundaryElement () |
virtual ElementData | GetNextCableElement () |
virtual void | WriteFiles ()=0 |
void | WriteFilesUsingMeshReader (AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader) |
Protected Attributes | |
OutputFileHandler * | mpOutputFileHandler |
std::string | mBaseName |
AbstractMeshReader < ELEMENT_DIM, SPACE_DIM > * | mpMeshReader |
unsigned | mNumNodes |
unsigned | mNumElements |
unsigned | mNumBoundaryElements |
unsigned | mNumCableElements |
An abstract mesh writer class.
Definition at line 43 of file AbstractMeshWriter.hpp.
AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::AbstractMeshWriter | ( | const std::string & | rDirectory, | |
const std::string & | rBaseName, | |||
const bool | clearOutputDir = true | |||
) | [inline] |
Constructor.
rDirectory | the directory in which to write the mesh to file | |
rBaseName | the base name of the files in which to write the mesh data | |
clearOutputDir | whether to clean the directory (defaults to true) |
Definition at line 38 of file AbstractMeshWriter.cpp.
References AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpOutputFileHandler.
AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::~AbstractMeshWriter | ( | ) | [inline, virtual] |
Destructor.
Definition at line 48 of file AbstractMeshWriter.cpp.
References AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpOutputFileHandler.
ElementData AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextBoundaryElement | ( | ) | [inline, virtual] |
Reimplemented in AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 99 of file AbstractMeshWriter.cpp.
References AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.
ElementData AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextCableElement | ( | ) | [inline, virtual] |
Reimplemented in AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 106 of file AbstractMeshWriter.cpp.
References AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.
ElementData AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement | ( | ) | [inline, virtual] |
Reimplemented in VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >, and PottsMeshWriter< SPACE_DIM >.
Definition at line 92 of file AbstractMeshWriter.cpp.
References AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.
std::vector< double > AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode | ( | ) | [inline, virtual] |
Reimplemented in VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >, and PottsMeshWriter< SPACE_DIM >.
Definition at line 85 of file AbstractMeshWriter.cpp.
References AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.
unsigned AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumBoundaryFaces | ( | ) | [inline] |
Get the number of boundary elements in the mesh.
Definition at line 72 of file AbstractMeshWriter.cpp.
References AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumBoundaryElements.
Referenced by MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::CreateFilesWithHeaders(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFacesAsEdges(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), and MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().
unsigned AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumCableElements | ( | ) | [inline] |
Get the number of cable elements in the mesh.
Definition at line 78 of file AbstractMeshWriter.cpp.
References AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumCableElements.
Referenced by TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().
unsigned AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumElements | ( | ) | [inline] |
Get the number of elements in the mesh.
Definition at line 66 of file AbstractMeshWriter.cpp.
References AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumElements.
Referenced by MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::CreateFilesWithHeaders(), VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::MakeVtkMesh(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteElementsAsFaces(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().
unsigned AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumNodes | ( | ) | [inline, virtual] |
Get the number of nodes in the mesh.
Reimplemented in CmguiDeformedSolutionsWriter< DIM >.
Definition at line 60 of file AbstractMeshWriter.cpp.
References AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumNodes.
Referenced by MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::CreateFilesWithHeaders(), VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::MakeVtkMesh(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().
std::string AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetOutputDirectory | ( | ) | [inline] |
Return the full path to the directory where meshes will be written.
Definition at line 54 of file AbstractMeshWriter.cpp.
References OutputFileHandler::GetOutputDirectoryFullPath(), and AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpOutputFileHandler.
virtual void AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles | ( | ) | [pure virtual] |
Write mesh data to files. This method must be overridden in concrete classes.
Implemented in VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >, CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >, MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >, TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >, VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >, PottsMeshWriter< SPACE_DIM >, and CmguiMeshWriter< DIM, DIM >.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMeshReader(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingParallelMesh().
void AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMeshReader | ( | AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > & | rMeshReader | ) | [inline] |
Read in a mesh and write it to file.
rMeshReader | the mesh reader |
Only triangles mesh readers know about cable elements
Definition at line 114 of file AbstractMeshWriter.cpp.
References PetscTools::AmMaster(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumBoundaryElements, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumCableElements, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumElements, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumNodes, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMeshReader, and AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().
Referenced by Hdf5ToCmguiConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToCmguiConverter(), Hdf5ToMeshalyzerConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToMeshalyzerConverter(), Hdf5ToVtkConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToVtkConverter(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMeshReaderAndMesh().
std::string AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mBaseName [protected] |
Base name for the input files
Definition at line 48 of file AbstractMeshWriter.hpp.
Referenced by CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >::CmguiMeshWriter(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenElementFile(), CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenElementFiles(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenFaceFile(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile(), CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile(), CmguiDeformedSolutionsWriter< DIM >::WriteCmguiScript(), CmguiDeformedSolutionsWriter< DIM >::WriteDeformationPositions(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteElementsAsFaces(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFacesAsEdges(), VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), CmguiDeformedSolutionsWriter< DIM >::WriteInitialMesh(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteMetaFile(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteNclFile(), and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteVtkUsingMesh().
unsigned AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumBoundaryElements [protected] |
Total number of boundary elements in mesh/mesh-reader
Definition at line 54 of file AbstractMeshWriter.hpp.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextBoundaryElement(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextCableElement(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumBoundaryFaces(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMeshReader(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingParallelMesh().
unsigned AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumCableElements [protected] |
Total number of cable elements in mesh/mesh-reader
Definition at line 55 of file AbstractMeshWriter.hpp.
Referenced by AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumCableElements(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), and AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMeshReader().
unsigned AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumElements [protected] |
Total number of elements in mesh/mesh-reader
Definition at line 53 of file AbstractMeshWriter.hpp.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextBoundaryElement(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextCableElement(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElementWithFaces(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMeshReader(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingParallelMesh().
unsigned AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumNodes [protected] |
Total number of nodes in mesh/mesh-reader
Definition at line 52 of file AbstractMeshWriter.hpp.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextBoundaryElement(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextCableElement(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMeshReader(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingParallelMesh().
AbstractMeshReader<ELEMENT_DIM,SPACE_DIM>* AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMeshReader [protected] |
Writer by default writes from a reader (for conversion). If this pointer is non-null, data can be copied straight across
Definition at line 50 of file AbstractMeshWriter.hpp.
Referenced by AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextBoundaryElement(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextCableElement(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), and AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMeshReader().
OutputFileHandler* AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpOutputFileHandler [protected] |
Output file handler
Definition at line 47 of file AbstractMeshWriter.hpp.
Referenced by AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::AbstractMeshWriter(), VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::AddProvenance(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetOutputDirectory(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenElementFile(), CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenElementFiles(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenFaceFile(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile(), CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile(), CmguiDeformedSolutionsWriter< DIM >::WriteCmguiScript(), CmguiDeformedSolutionsWriter< DIM >::WriteDeformationPositions(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteElementsAsFaces(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFacesAsEdges(), VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteMetaFile(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteNclFile(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteVtkUsingMesh(), and AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::~AbstractMeshWriter().