#include <AbstractTetrahedralMeshWriter.hpp>
Public Member Functions | |
AbstractTetrahedralMeshWriter (const std::string &rDirectory, const std::string &rBaseName, const bool clearOutputDir=true) | |
virtual | ~AbstractTetrahedralMeshWriter () |
std::string | GetOutputDirectory () |
void | SetNextNode (std::vector< double > nextNode) |
virtual void | SetNextElement (std::vector< unsigned > nextElement) |
void | SetNextBoundaryFace (std::vector< unsigned > nextFace) |
virtual void | WriteFiles ()=0 |
unsigned | GetNumNodes () |
unsigned | GetNumElements () |
unsigned | GetNumBoundaryFaces () |
unsigned | GetNumBoundaryEdges () |
void | WriteFilesUsingMesh (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &rMesh) |
void | WriteFilesUsingMesh (const AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &rMesh) |
void | WriteFilesUsingMeshReader (AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader) |
void | WriteFilesUsingMeshReader (AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader, const std::vector< unsigned > &rNodePermutation) |
Protected Attributes | |
OutputFileHandler * | mpOutputFileHandler |
std::string | mBaseName |
std::vector< std::vector < double > > | mNodeData |
std::vector< std::vector < unsigned > > | mElementData |
std::vector< std::vector < unsigned > > | mBoundaryFaceData |
std::vector< std::vector < double > >::iterator | mpNodeIterator |
std::vector< std::vector < unsigned > >::iterator | mpElementIterator |
std::vector< std::vector < unsigned > >::iterator | mpBoundaryFaceIterator |
bool | mIndexFromZero |
bool | mWriteMetaFile |
Definition at line 53 of file AbstractTetrahedralMeshWriter.hpp.
AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::AbstractTetrahedralMeshWriter | ( | 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 AbstractTetrahedralMeshWriter.cpp.
References AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpOutputFileHandler.
AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::~AbstractTetrahedralMeshWriter | ( | ) | [inline, virtual] |
Destructor.
Definition at line 47 of file AbstractTetrahedralMeshWriter.cpp.
References AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpOutputFileHandler.
std::string AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetOutputDirectory | ( | ) | [inline] |
Return the full path to the directory where meshes will be written.
Definition at line 77 of file AbstractTetrahedralMeshWriter.cpp.
References OutputFileHandler::GetOutputDirectoryFullPath(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpOutputFileHandler.
void AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetNextNode | ( | std::vector< double > | nextNode | ) | [inline] |
Add an entry to mNodeData.
nextNode | coordinates of the node to add |
Definition at line 83 of file AbstractTetrahedralMeshWriter.cpp.
References AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNodeData.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMeshReader().
void AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetNextElement | ( | std::vector< unsigned > | nextElement | ) | [inline, virtual] |
Add an entry to mElementData.
nextElement | array of the nodes in the element to add |
Definition at line 90 of file AbstractTetrahedralMeshWriter.cpp.
References AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mElementData.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMeshReader().
void AbstractTetrahedralMeshWriter< 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 97 of file AbstractTetrahedralMeshWriter.cpp.
References AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mBoundaryFaceData.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMeshReader().
virtual void AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles | ( | ) | [pure virtual] |
Write mesh data to files. This method must be overridden in concrete classes.
Implemented in CmguiWriter, MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >, and TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMeshReader().
unsigned AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumNodes | ( | ) | [inline] |
Get the number of nodes in the mesh.
Definition at line 53 of file AbstractTetrahedralMeshWriter.cpp.
References AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNodeData.
Referenced by TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), and MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().
unsigned AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumElements | ( | ) | [inline] |
Get the number of elements in the mesh.
Definition at line 59 of file AbstractTetrahedralMeshWriter.cpp.
References AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mElementData.
Referenced by TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteElementsAsFaces(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), and MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().
unsigned AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumBoundaryFaces | ( | ) | [inline] |
Get the number of boundary elements in the mesh.
Definition at line 65 of file AbstractTetrahedralMeshWriter.cpp.
References AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mBoundaryFaceData.
Referenced by TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFacesAsEdges(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), and MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().
unsigned AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumBoundaryEdges | ( | ) | [inline] |
Get the number of boundary faces in the mesh.
Definition at line 71 of file AbstractTetrahedralMeshWriter.cpp.
References AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mBoundaryFaceData.
void AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh | ( | AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > & | rMesh | ) | [inline] |
Write a mesh to file.
rMesh | the mesh |
Definition at line 104 of file AbstractTetrahedralMeshWriter.cpp.
References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryElementIteratorBegin(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryElementIteratorEnd(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorBegin(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorEnd(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumAllNodes(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), Node< SPACE_DIM >::GetPoint(), Node< SPACE_DIM >::IsDeleted(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetNextBoundaryFace(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetNextElement(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetNextNode(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::CloseFilesAndPostProcess(), CuboidMeshConstructor< DIM >::Construct(), CardiacElectroMechanicsProblem< DIM >::Initialise(), AbstractTetrahedralMesh< ELEM_DIM, SPACE_DIM >::save(), and CardiacElectroMechanicsProblem< DIM >::Solve().
void AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh | ( | const AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > & | rMesh | ) | [inline] |
Write a const mesh to file. Used by the serialization methods and avoids iterators...
rMesh | the mesh |
Definition at line 167 of file AbstractTetrahedralMeshWriter.cpp.
References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryElement(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumAllBoundaryElements(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumAllElements(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumAllNodes(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), Node< SPACE_DIM >::GetPoint(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::IsDeleted(), Node< SPACE_DIM >::IsDeleted(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetNextBoundaryFace(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetNextElement(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetNextNode(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().
void AbstractTetrahedralMeshWriter< 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 229 of file AbstractTetrahedralMeshWriter.cpp.
References AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumFaces(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), ElementData::NodeIndices, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetNextBoundaryFace(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetNextElement(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetNextNode(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::CloseFilesAndPostProcess(), AbstractTetrahedralMesh< ELEM_DIM, SPACE_DIM >::save(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMeshReader().
void AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMeshReader | ( | AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > & | rMeshReader, | |
const std::vector< unsigned > & | rNodePermutation | |||
) | [inline] |
Read in a mesh and a given permutation of the node indices, and write the permuted mesh to file.
rMeshReader | the mesh reader | |
rNodePermutation | the node permutation |
Definition at line 248 of file AbstractTetrahedralMeshWriter.cpp.
References AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumFaces(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNodeData, ElementData::NodeIndices, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetNextBoundaryFace(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetNextElement(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMeshReader().
OutputFileHandler* AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpOutputFileHandler [protected] |
Output file handler
Definition at line 57 of file AbstractTetrahedralMeshWriter.hpp.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::AbstractTetrahedralMeshWriter(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetOutputDirectory(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteElementsAsFaces(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFacesAsEdges(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::~AbstractTetrahedralMeshWriter().
std::string AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mBaseName [protected] |
Base name for the input files
Definition at line 58 of file AbstractTetrahedralMeshWriter.hpp.
Referenced by TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteElementsAsFaces(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFacesAsEdges(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), and MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().
std::vector< std::vector<double> > AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNodeData [protected] |
Is an array of node coordinates ((i,j)th entry is the jth coordinate of node i)
Definition at line 60 of file AbstractTetrahedralMeshWriter.hpp.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetNextNode(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMeshReader().
std::vector< std::vector<unsigned> > AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mElementData [protected] |
Is an array of the nodes in each element ((i,j)th entry is the jth node of element i)
Definition at line 61 of file AbstractTetrahedralMeshWriter.hpp.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetNextElement(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteElementsAsFaces(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), and MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().
std::vector< std::vector<unsigned> > AbstractTetrahedralMeshWriter< 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 62 of file AbstractTetrahedralMeshWriter.hpp.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumBoundaryEdges(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumBoundaryFaces(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetNextBoundaryFace(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFacesAsEdges(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), and MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().
std::vector< std::vector<double> >::iterator AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpNodeIterator [protected] |
Is an iterator for the node data
Definition at line 64 of file AbstractTetrahedralMeshWriter.hpp.
std::vector< std::vector<unsigned> >::iterator AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpElementIterator [protected] |
Is an iterator for the element data
Definition at line 65 of file AbstractTetrahedralMeshWriter.hpp.
std::vector< std::vector<unsigned> >::iterator AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpBoundaryFaceIterator [protected] |
Is an iterator for the boundary face data
Definition at line 66 of file AbstractTetrahedralMeshWriter.hpp.
bool AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mIndexFromZero [protected] |
True if input data is numbered from zero, false otherwise
Definition at line 68 of file AbstractTetrahedralMeshWriter.hpp.
Referenced by MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::MeshalyzerMeshWriter(), and MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().
bool AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mWriteMetaFile [protected] |
Whether to write a metafile (only used by MeshylazerMeshWriter)
Definition at line 69 of file AbstractTetrahedralMeshWriter.hpp.
Referenced by MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::MeshalyzerMeshWriter(), and MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().