Chaste  Release::2018.1
Hdf5ToXdmfConverter< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <Hdf5ToXdmfConverter.hpp>

+ Inheritance diagram for Hdf5ToXdmfConverter< ELEMENT_DIM, SPACE_DIM >:
+ Collaboration diagram for Hdf5ToXdmfConverter< ELEMENT_DIM, SPACE_DIM >:

Public Member Functions

 Hdf5ToXdmfConverter (const FileFinder &rInputDirectory, const std::string &rFileBaseName, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh)
 
void AddDataOnNodes (XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *pGridElement, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *pDomDocument, unsigned timeStep)
 
- Public Member Functions inherited from AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >
 AbstractHdf5Converter (const FileFinder &rInputDirectory, const std::string &rFileBaseName, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh, const std::string &rSubdirectoryName, unsigned precision)
 
void WriteInfoFile ()
 
 ~AbstractHdf5Converter ()
 
std::string GetSubdirectory ()
 
- Public Member Functions inherited from XdmfMeshWriter< ELEMENT_DIM, SPACE_DIM >
 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< doubleGetNextNode ()
 
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)
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >
bool MoveOntoNextDataset ()
 
- Protected Attributes inherited from AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >
const FileFindermrH5Folder
 
boost::shared_ptr< Hdf5DataReadermpReader
 
unsigned mNumVariables
 
std::string mFileBaseName
 
std::vector< std::string > mDatasetNames
 
unsigned mOpenDatasetIndex
 
AbstractTetrahedralMesh
< ELEMENT_DIM, SPACE_DIM > * 
mpMesh
 
OutputFileHandlermpOutputFileHandler
 
std::string mRelativeSubdirectory
 
unsigned mPrecision
 
- Protected Attributes inherited from XdmfMeshWriter< ELEMENT_DIM, SPACE_DIM >
unsigned mNumberOfTimePoints
 
double mTimeStep
 
- Protected Attributes inherited from AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >
unsigned mNodesPerElement
 
unsigned mNodesPerBoundaryElement
 
AbstractTetrahedralMesh
< ELEMENT_DIM, SPACE_DIM > * 
mpMesh
 
DistributedTetrahedralMesh
< ELEMENT_DIM, SPACE_DIM > * 
mpDistributedMesh
 
MixedDimensionMesh
< ELEMENT_DIM, SPACE_DIM > * 
mpMixedMesh
 
MeshWriterIterators
< ELEMENT_DIM, SPACE_DIM > * 
mpIters
 
bool mIndexFromZero
 
bool mWriteMetaFile
 
unsigned mNodeCounterForParallelMesh
 
unsigned mElementCounterForParallelMesh
 
unsigned mBoundaryElementCounterForParallelMesh
 
unsigned mCableElementCounterForParallelMesh
 
bool mFilesAreBinary
 
- Protected Attributes inherited from AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >
OutputFileHandlermpOutputFileHandler
 
std::string mBaseName
 
AbstractMeshReader
< ELEMENT_DIM, SPACE_DIM > * 
mpMeshReader
 
unsigned mNumNodes
 
unsigned mNumElements
 
unsigned mNumBoundaryElements
 
unsigned mNumCableElements
 

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
class Hdf5ToXdmfConverter< ELEMENT_DIM, SPACE_DIM >

This class "converts" from Hdf5 format to XDMF format. The output will be one .xdmf master file with separate geometry/topology files. The HDF5 data is not converted, but is rather linked to by the .xdmf master file

Definition at line 47 of file Hdf5ToXdmfConverter.hpp.

Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
Hdf5ToXdmfConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToXdmfConverter ( const FileFinder rInputDirectory,
const std::string &  rFileBaseName,
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *  pMesh 
)

Constructor, which does the conversion and writes the .vtu file.

Note
This method is collective, and hence must be called by all processes.
Parameters
rInputDirectoryThe input directory, relative to CHASTE_TEST_OUTPUT, where the .h5 file has been written
rFileBaseNameThe base name of the data file.
pMeshPointer to the mesh.

Definition at line 39 of file Hdf5ToXdmfConverter.cpp.

References XdmfMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNumberOfTimePoints, AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::mpReader, XdmfMeshWriter< ELEMENT_DIM, SPACE_DIM >::mTimeStep, and XdmfMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().

Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void Hdf5ToXdmfConverter< ELEMENT_DIM, SPACE_DIM >::AddDataOnNodes ( XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *  pGridElement,
XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *  pDomDocument,
unsigned  timeStep 
)
virtual

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).

Parameters
pGridElementPointer to DOMElement to append Attribute tags to.
pDomDocumentPointer to DOMDocument to generate new elements.
timeStepIndex of time point to write.
Todo:
#1157 Make this work in parallel

Reimplemented from XdmfMeshWriter< ELEMENT_DIM, SPACE_DIM >.

Definition at line 62 of file Hdf5ToXdmfConverter.cpp.


The documentation for this class was generated from the following files: