#include <AbstractMeshWriter.hpp>
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 | GetNumBoundaryEdges () |
virtual std::vector< double > | GetNextNode () |
virtual ElementData | GetNextElement () |
void | SetNextBoundaryFace (std::vector< unsigned > nextFace) |
virtual void | WriteFiles ()=0 |
void | WriteFilesUsingMeshReader (AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader) |
Protected Attributes | |
OutputFileHandler * | mpOutputFileHandler |
std::string | mBaseName |
std::vector< std::vector < unsigned > > | mBoundaryFaceData |
AbstractMeshReader < ELEMENT_DIM, SPACE_DIM > * | mpMeshReader |
unsigned | mNumNodes |
unsigned | mNumElements |
unsigned | mNumBoundaryElements |
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.
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.
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(), and VertexMeshWriter< 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 >::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 >::GetNumBoundaryEdges | ( | ) | [inline] |
Get the number of boundary faces in the mesh.
Definition at line 78 of file AbstractMeshWriter.cpp.
References AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mBoundaryFaceData.
std::vector< double > AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode | ( | ) | [inline, virtual] |
Reimplemented in VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >, and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 85 of file AbstractMeshWriter.cpp.
References AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode().
ElementData AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement | ( | ) | [inline, virtual] |
Reimplemented in VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >, and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 92 of file AbstractMeshWriter.cpp.
References AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMeshReader.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement().
void AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetNextBoundaryFace | ( | std::vector< unsigned > | nextFace | ) | [inline] |
Add an entry to mBoundaryFaceData.
nextFace | array of the nodes on the boundary face to add |
Definition at line 99 of file AbstractMeshWriter.cpp.
References AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mBoundaryFaceData.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMeshReader(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingParallelMesh().
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 >, 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 |
Definition at line 105 of file AbstractMeshWriter.cpp.
References PetscTools::AmMaster(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumFaces(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumBoundaryElements, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumElements, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumNodes, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMeshReader, ElementData::NodeIndices, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetNextBoundaryFace(), 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 AbstractTetrahedralMesh< SPACE_DIM, SPACE_DIM >::save().
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(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenFaceFile(), MeshalyzerMeshWriter< 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(), CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteMetaFile(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteVtkUsingMesh(), and AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::~AbstractMeshWriter().
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(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenFaceFile(), MeshalyzerMeshWriter< 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(), CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), CmguiDeformedSolutionsWriter< DIM >::WriteInitialMesh(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteMetaFile(), and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteVtkUsingMesh().
std::vector< std::vector<unsigned> > AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mBoundaryFaceData [protected] |
Is an array of the nodes on each boundary face ((i,j)th entry is the jth node of face i)
Definition at line 50 of file AbstractMeshWriter.hpp.
Referenced by AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumBoundaryEdges(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetNextBoundaryFace(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFacesAsEdges(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), and MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().
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 52 of file AbstractMeshWriter.hpp.
Referenced by 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().
unsigned AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumNodes [protected] |
Total number of nodes in mesh/mesh-reader
Definition at line 54 of file AbstractMeshWriter.hpp.
Referenced by 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().
unsigned AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumElements [protected] |
Total number of elements in mesh/mesh-reader
Definition at line 55 of file AbstractMeshWriter.hpp.
Referenced by 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(), and AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMeshReader().
unsigned AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumBoundaryElements [protected] |
Total number of boundary elements in mesh/mesh-reader
Definition at line 56 of file AbstractMeshWriter.hpp.
Referenced by AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumBoundaryFaces(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), and AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMeshReader().