Chaste Release::3.1
|
#include <AbstractTetrahedralMeshWriter.hpp>
An abstract tetrahedral mesh writer class.
Definition at line 65 of file AbstractTetrahedralMeshWriter.hpp.
AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::AbstractTetrahedralMeshWriter | ( | const std::string & | rDirectory, |
const std::string & | rBaseName, | ||
const bool | clearOutputDir = true |
||
) |
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 70 of file AbstractTetrahedralMeshWriter.cpp.
References AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpIters.
AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::~AbstractTetrahedralMeshWriter | ( | ) | [virtual] |
Destructor just deletes the node map if memory has been allocated for it
Definition at line 93 of file AbstractTetrahedralMeshWriter.cpp.
void AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::AppendLocalDataToFiles | ( | ) | [private, virtual] |
Append local mesh data to output files.
Reimplemented in CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >, MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >, and CmguiMeshWriter< DIM, DIM >.
Definition at line 693 of file AbstractTetrahedralMeshWriter.cpp.
References NEVER_REACHED.
void AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::CreateFilesWithHeaders | ( | ) | [private, virtual] |
Create output files and add headers.
Reimplemented in CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >, MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >, and CmguiMeshWriter< DIM, DIM >.
Definition at line 685 of file AbstractTetrahedralMeshWriter.cpp.
References NEVER_REACHED.
ElementData AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextBoundaryElement | ( | ) | [virtual] |
Reimplemented from AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 242 of file AbstractTetrahedralMeshWriter.cpp.
References PetscTools::AmMaster(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextBoundaryElement(), and ElementData::NodeIndices.
ElementData AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextCableElement | ( | ) | [virtual] |
Reimplemented from AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 310 of file AbstractTetrahedralMeshWriter.cpp.
References PetscTools::AmMaster(), ElementData::AttributeValue, AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetAttribute(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextCableElement(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::IsDeleted(), and ElementData::NodeIndices.
ElementData AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement | ( | ) | [virtual] |
Reimplemented from AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 168 of file AbstractTetrahedralMeshWriter.cpp.
References PetscTools::AmMaster(), ElementData::AttributeValue, AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetAttribute(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::IsDeleted(), and ElementData::NodeIndices.
std::vector< double > AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode | ( | ) | [virtual] |
Reimplemented from AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 118 of file AbstractTetrahedralMeshWriter.cpp.
References PetscTools::AmMaster(), and AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode().
void AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesFooter | ( | ) | [private, virtual] |
Append footers to output files.
Reimplemented in CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >, MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >, and CmguiMeshWriter< DIM, DIM >.
Definition at line 701 of file AbstractTetrahedralMeshWriter.cpp.
References NEVER_REACHED.
void AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh | ( | AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > & | rMesh, |
bool | keepOriginalElementIndexing = true |
||
) | [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 as in memory. Optimisations can be applied if this is not needed. |
Reimplemented in VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 475 of file AbstractTetrahedralMeshWriter.cpp.
References PetscTools::AmMaster(), PetscTools::Barrier(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), and NodeMap::SetNewIndex().
Referenced by Hdf5ToCmguiConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToCmguiConverter(), Hdf5ToMeshalyzerConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToMeshalyzerConverter(), CardiacElectroMechanicsProblem< DIM, ELEC_PROB_DIM >::Initialise(), CellBasedPdeHandler< DIM >::OpenResultsFiles(), AbstractTetrahedralMesh< SPACE_DIM, SPACE_DIM >::save(), and VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().
void AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMeshReaderAndMesh | ( | AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > & | rMeshReader, |
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > & | rMesh | ||
) |
Write a const mesh to file. Used by the serialization methods and avoids iterators. The master process will use the mesh reader to copy over most of the mesh files, converting them to binary format. However, the mesh is used to write a .ncl file which contains node connectivity information.
rMeshReader | a reader of the original mesh files on disk |
rMesh | the mesh object in memory |
Definition at line 557 of file AbstractTetrahedralMeshWriter.cpp.
Referenced by AbstractTetrahedralMesh< SPACE_DIM, SPACE_DIM >::save().
void AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingParallelMesh | ( | bool | keepOriginalElementIndexing = true | ) | [private, virtual] |
Write a parallel mesh to file. Used by the serialization methods.
keepOriginalElementIndexing | Whether to write the mesh with the same element ordering as in memory. Optimisations can be applied if this is not needed. |
Definition at line 566 of file AbstractTetrahedralMeshWriter.cpp.
References PetscTools::AmMaster(), PetscTools::AmTopMost(), PetscTools::Barrier(), PetscTools::BeginRoundRobin(), PetscTools::EndRoundRobin(), PetscTools::GetMyRank(), and PetscTools::GetNumProcs().
void AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteNclFile | ( | AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > & | rMesh, |
bool | invertMeshPermutation = false |
||
) | [private] |
Write out a node connectivity information file (collectively called, involves some communication).
rMesh | the mesh object in memory |
invertMeshPermutation | whether to permute the file using the inverse of the mesh's permutation |
Definition at line 370 of file AbstractTetrahedralMeshWriter.cpp.
References PetscTools::AmMaster(), PetscTools::AmTopMost(), PetscTools::Barrier(), PetscTools::BeginRoundRobin(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::CalculateMaximumContainingElementsPerProcess(), PetscTools::EndRoundRobin(), FileFinder::GetAbsolutePath(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeIteratorBegin(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeIteratorEnd(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumAllNodes(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), ChasteBuildInfo::GetProvenanceString(), PetscTools::IsSequential(), and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::rGetNodePermutation().
unsigned AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mBoundaryElementCounterForParallelMesh [protected] |
Used by master process for polling processes for the next boundary element
Definition at line 119 of file AbstractTetrahedralMeshWriter.hpp.
unsigned AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mCableElementCounterForParallelMesh [protected] |
Used by master process for polling processes for the next cable element
Definition at line 120 of file AbstractTetrahedralMeshWriter.hpp.
unsigned AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mElementCounterForParallelMesh [protected] |
Used by master process for polling processes for the next element
Definition at line 118 of file AbstractTetrahedralMeshWriter.hpp.
bool AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mFilesAreBinary [protected] |
Whether all data is to be written as binary - used in derived class TrianglesMeshWriter
Definition at line 121 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 115 of file AbstractTetrahedralMeshWriter.hpp.
Referenced by CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >::CmguiMeshWriter(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::MeshalyzerMeshWriter(), and VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::VtkMeshWriter().
unsigned AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNodeCounterForParallelMesh [protected] |
Used by master process for polling processes for the next node
Definition at line 117 of file AbstractTetrahedralMeshWriter.hpp.
unsigned AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNodesPerBoundaryElement [protected] |
Same as (ELEMENT_DIM), except when writing a quadratic mesh!
Definition at line 109 of file AbstractTetrahedralMeshWriter.hpp.
unsigned AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNodesPerElement [protected] |
Same as (ELEMENT_DIM+1), except when writing a quadratic mesh!
Definition at line 108 of file AbstractTetrahedralMeshWriter.hpp.
DistributedTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpDistributedMesh [protected] |
Another pointer to the mesh, produced by dynamic cast
Definition at line 111 of file AbstractTetrahedralMeshWriter.hpp.
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 113 of file AbstractTetrahedralMeshWriter.hpp.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::AbstractTetrahedralMeshWriter().
AbstractTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMesh [private] |
Pointer to the mesh (if we are writing from a mesh)
Definition at line 102 of file AbstractTetrahedralMeshWriter.hpp.
MixedDimensionMesh<ELEMENT_DIM,SPACE_DIM>* AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpMixedMesh [protected] |
Another pointer to the mesh, produced by dynamic cast
Definition at line 112 of file AbstractTetrahedralMeshWriter.hpp.
NodeMap* AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpNodeMap [private] |
Node map to be used when writing a mesh that has deleted nodes
Definition at line 104 of file AbstractTetrahedralMeshWriter.hpp.
bool AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mWriteMetaFile [protected] |
Whether to write a metafile (only used by MeshylazerMeshWriter)
Definition at line 116 of file AbstractTetrahedralMeshWriter.hpp.
Referenced by MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::MeshalyzerMeshWriter().