#include <AbstractTetrahedralMeshWriter.hpp>
Public Member Functions | |
AbstractTetrahedralMeshWriter (const std::string &rDirectory, const std::string &rBaseName, const bool clearOutputDir=true) | |
~AbstractTetrahedralMeshWriter () | |
virtual void | WriteFilesUsingMesh (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, bool keepOriginalElementIndexing=true) |
std::vector< double > | GetNextNode () |
ElementData | GetNextElement () |
Protected Attributes | |
unsigned | mNodesPerElement |
DistributedTetrahedralMesh < ELEMENT_DIM, SPACE_DIM > * | mpParallelMesh |
MeshWriterIterators < ELEMENT_DIM, SPACE_DIM > * | mpIters |
bool | mIndexFromZero |
bool | mWriteMetaFile |
unsigned | mNodeCounterForParallelMesh |
unsigned | mElementCounterForParallelMesh |
Private Member Functions | |
virtual void | WriteFilesUsingParallelMesh (bool keepOriginalElementIndexing=true) |
virtual void | CreateFilesWithHeaders () |
virtual void | AppendLocalDataToFiles () |
virtual void | WriteFilesFooter () |
Private Attributes | |
AbstractTetrahedralMesh < ELEMENT_DIM, SPACE_DIM > * | mpMesh |
NodeMap * | mpNodeMap |
Definition at line 60 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 58 of file AbstractTetrahedralMeshWriter.cpp.
References AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpIters.
AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::~AbstractTetrahedralMeshWriter | ( | ) | [inline] |
Destructor just deletes the node map if memory has been allocated for it
Definition at line 76 of file AbstractTetrahedralMeshWriter.cpp.
References AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpIters, and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpNodeMap.
void AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingParallelMesh | ( | bool | keepOriginalElementIndexing = true |
) | [inline, private, virtual] |
Write a parallel mesh to file. Used by the serialization methods
keepOriginalElementIndexing | Whether to write the mesh with the same element ordering. Optimisations can be applied if this is not needed. |
Definition at line 298 of file AbstractTetrahedralMeshWriter.cpp.
References PetscTools::AmMaster(), PetscTools::AmTopMost(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::AppendLocalDataToFiles(), PetscTools::Barrier(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::CreateFilesWithHeaders(), PetscTools::GetMyRank(), PetscTools::GetNumProcs(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumNodes, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMesh, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpParallelMesh, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetNextBoundaryFace(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesFooter().
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().
void AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::CreateFilesWithHeaders | ( | ) | [inline, private, virtual] |
Create output files and add headers.
Reimplemented in MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 410 of file AbstractTetrahedralMeshWriter.cpp.
References NEVER_REACHED.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingParallelMesh().
void AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::AppendLocalDataToFiles | ( | ) | [inline, private, virtual] |
Append local mesh data to output files.
Reimplemented in MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 418 of file AbstractTetrahedralMeshWriter.cpp.
References NEVER_REACHED.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingParallelMesh().
void AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesFooter | ( | ) | [inline, private, virtual] |
Append footers to output files.
Reimplemented in MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 426 of file AbstractTetrahedralMeshWriter.cpp.
References NEVER_REACHED.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingParallelMesh().
void AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh | ( | AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > & | rMesh, | |
bool | keepOriginalElementIndexing = true | |||
) | [inline, virtual] |
Write a const mesh to file. Used by the serialization methods and avoids iterators...
rMesh | the mesh | |
keepOriginalElementIndexing | Whether to write the mesh with the same element ordering. Optimisations can be applied if this is not needed. |
Definition at line 222 of file AbstractTetrahedralMeshWriter.cpp.
References PetscTools::AmMaster(), PetscTools::Barrier(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetBoundaryElement(), NodeMap::GetNewIndex(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumAllBoundaryElements(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNodesPerElement, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumBoundaryElements, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumElements, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumNodes, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpIters, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMesh, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMeshReader, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpNodeMap, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpParallelMesh, NodeMap::SetNewIndex(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetNextBoundaryFace(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingParallelMesh().
Referenced by Hdf5ToCmguiConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToCmguiConverter(), Hdf5ToMeshalyzerConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToMeshalyzerConverter(), Hdf5ToVtkConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToVtkConverter(), CardiacElectroMechanicsProblem< DIM >::Initialise(), AbstractTetrahedralMesh< SPACE_DIM, SPACE_DIM >::save(), and CmguiDeformedSolutionsWriter< DIM >::WriteInitialMesh().
std::vector< double > AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode | ( | ) | [inline, virtual] |
Reimplemented from AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 97 of file AbstractTetrahedralMeshWriter.cpp.
References PetscTools::AmMaster(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNodeCounterForParallelMesh, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpIters, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMesh, and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpParallelMesh.
Referenced by VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::MakeVtkMesh(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), and CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().
ElementData AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement | ( | ) | [inline, virtual] |
Reimplemented from AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 147 of file AbstractTetrahedralMeshWriter.cpp.
References PetscTools::AmMaster(), ElementData::AttributeValue, NodeMap::GetNewIndex(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetRegion(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::IsDeleted(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mElementCounterForParallelMesh, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNodesPerElement, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumElements, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumNodes, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpIters, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMesh, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpNodeMap, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpParallelMesh, and ElementData::NodeIndices.
Referenced by VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::MakeVtkMesh(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteElementsAsFaces(), TrianglesMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), and CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().
AbstractTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMesh [private] |
Pointer to the mesh (if we are writing from the a mesh)
Definition at line 86 of file AbstractTetrahedralMeshWriter.hpp.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingParallelMesh().
NodeMap* AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpNodeMap [private] |
Node map to be used when writing a mesh that has deleted nodes
Definition at line 88 of file AbstractTetrahedralMeshWriter.hpp.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::~AbstractTetrahedralMeshWriter().
unsigned AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNodesPerElement [protected] |
Same as (ELEMENT_DIM+1), except when writing a quadratic mesh!
Definition at line 92 of file AbstractTetrahedralMeshWriter.hpp.
Referenced by MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::AppendLocalDataToFiles(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().
DistributedTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpParallelMesh [protected] |
Another pointer to the mesh, produced by dynamic cast
Definition at line 94 of file AbstractTetrahedralMeshWriter.hpp.
Referenced by MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::AppendLocalDataToFiles(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingParallelMesh().
MeshWriterIterators<ELEMENT_DIM,SPACE_DIM>* AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpIters [protected] |
Handy iterators so that we know the next node/element to be written
Definition at line 95 of file AbstractTetrahedralMeshWriter.hpp.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::AbstractTetrahedralMeshWriter(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::~AbstractTetrahedralMeshWriter().
bool AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mIndexFromZero [protected] |
True if input data is numbered from zero, false otherwise
Definition at line 97 of file AbstractTetrahedralMeshWriter.hpp.
Referenced by MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::AppendLocalDataToFiles(), CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >::CmguiMeshWriter(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::MeshalyzerMeshWriter(), VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::VtkMeshWriter(), 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 98 of file AbstractTetrahedralMeshWriter.hpp.
Referenced by MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::MeshalyzerMeshWriter(), and MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteMetaFile().
unsigned AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNodeCounterForParallelMesh [protected] |
Used by master process for polling processes for the next node
Definition at line 99 of file AbstractTetrahedralMeshWriter.hpp.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode().
unsigned AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mElementCounterForParallelMesh [protected] |
Used by master process for polling processes for the next element
Definition at line 100 of file AbstractTetrahedralMeshWriter.hpp.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement().