Chaste
Release::3.4
|
#include <XdmfMeshWriter.hpp>
Public Member Functions | |
XdmfMeshWriter (const std::string &rDirectory, const std::string &rBaseName, const bool clearOutputDir=true) | |
void | WriteFiles () |
void | WriteFilesUsingMesh (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, bool keepOriginalElementIndexing=true) |
Public Member Functions inherited from AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM > | |
AbstractTetrahedralMeshWriter (const std::string &rDirectory, const std::string &rBaseName, const bool clearOutputDir=true) | |
virtual | ~AbstractTetrahedralMeshWriter () |
void | WriteFilesUsingMeshReaderAndMesh (AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &rMesh) |
std::vector< double > | GetNextNode () |
ElementData | GetNextElement () |
ElementData | GetNextBoundaryElement () |
ElementData | GetNextCableElement () |
Public Member Functions inherited from AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM > | |
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 () |
void | WriteFilesUsingMeshReader (AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader) |
Private Member Functions | |
void | WriteXdmfMasterFile (unsigned numberOfChunks=1u) |
virtual void | AddDataOnNodes (XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *pGridElement, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *pDomDocument, unsigned timeStep) |
A class for writing from a Chaste mesh to the geometry/topology components of an XDMF file.
Definition at line 62 of file XdmfMeshWriter.hpp.
XdmfMeshWriter< ELEMENT_DIM, SPACE_DIM >::XdmfMeshWriter | ( | 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 44 of file XdmfMeshWriter.cpp.
|
inlineprivatevirtual |
Generate Attribute tags and append to the element. Here this is a dummy class, but can be overloaded with real variables elsewhere (see pde/src/postprocesssing/Hdf5toXdmfConverter).
pGridElement | Pointer to DOMElement to append Attribute tags to. |
pDomDocument | Pointer to DOMDocument to generate new elements. |
timeStep | Index of time point to write. |
Reimplemented in Hdf5ToXdmfConverter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 83 of file XdmfMeshWriter.hpp.
|
virtual |
Write the files using a mesh reader. Called from WriteFilesUsingMeshReader in the base class.
Implements AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 183 of file XdmfMeshWriter.cpp.
References PetscTools::AmMaster(), EXCEPTION, and ChasteBuildInfo::GetProvenanceString().
|
virtual |
Write the files using mesh – this allows the parallel distributed case to write only local data.
rMesh | the mesh |
keepOriginalElementIndexing | Whether to write the mesh with the same element ordering. Ignored in this derived class |
Reimplemented from AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 54 of file XdmfMeshWriter.cpp.
References PetscTools::AmMaster(), PetscTools::Barrier(), EXCEPTION, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorBegin(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorEnd(), PetscTools::GetMyRank(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeIteratorBegin(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeIteratorEnd(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), PetscTools::GetNumProcs(), ChasteBuildInfo::GetProvenanceString(), and PetscTools::IsParallel().
Referenced by Hdf5ToXdmfConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToXdmfConverter().
|
private |
Write the master file. This just contains references to the geometry/topology files.
numberOfChunks | is the number of geometric pieces which is 1 for sequential code and for non-distributed meshes. |
Definition at line 247 of file XdmfMeshWriter.cpp.
References PetscTools::AmMaster(), and ChasteBuildInfo::GetProvenanceString().
|
protected |
Defaults to 1, when we are writing geometry only. Used in HDF5 converter which has "protected" access as a derived class.
Definition at line 65 of file XdmfMeshWriter.hpp.
Referenced by Hdf5ToXdmfConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToXdmfConverter().
|
protected |
Defaults to 1.0.
Definition at line 66 of file XdmfMeshWriter.hpp.
Referenced by Hdf5ToXdmfConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToXdmfConverter().