Chaste  Release::2017.1
AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <AbstractHdf5Converter.hpp>

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

Public Member Functions

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

Protected Member Functions

bool MoveOntoNextDataset ()
 

Protected Attributes

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
 

Private Member Functions

void GenerateListOfDatasets (const FileFinder &rH5Folder, const std::string &rFileName)
 

Detailed Description

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

The derived children of this class convert output from Hdf5 format to a range of other formats for postprocessing.

Definition at line 50 of file AbstractHdf5Converter.hpp.

Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
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 
)

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

Note
This method is collective, and must be called by all processes.
Parameters
rInputDirectoryThe input directory, where the .h5 file to post-process is.
rFileBaseNameThe base name of the data file.
pMeshPointer to the mesh.
rSubdirectoryNameName for the output directory to be created (relative to inputDirectory).
precisionThe number of digits to use in numerical output to file.

Definition at line 50 of file AbstractHdf5Converter.cpp.

References AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::GenerateListOfDatasets(), AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::mFileBaseName, AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::MoveOntoNextDataset(), AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::mpOutputFileHandler, AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::mRelativeSubdirectory, and AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::mrH5Folder.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::~AbstractHdf5Converter ( )

Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::GenerateListOfDatasets ( const FileFinder rH5Folder,
const std::string &  rFileName 
)
private

Have a look in the HDF5 file and generate a list of the datasets that it contains.

Parameters
rH5FolderThe directory the h5 file is in.
rFileNameThe name of the h5 file.

Definition at line 157 of file AbstractHdf5Converter.cpp.

References FileFinder::GetAbsolutePath(), AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::mDatasetNames, and NEVER_REACHED.

Referenced by AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::AbstractHdf5Converter().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::string AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::GetSubdirectory ( )
Returns
the relative path of the sub-directory in which the converted output is stored.

Definition at line 115 of file AbstractHdf5Converter.cpp.

References AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::mRelativeSubdirectory.

Referenced by AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::CloseFilesAndPostProcess().

Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<std::string> AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::mDatasetNames
protected
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::string AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::mFileBaseName
protected
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::mNumVariables
protected
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::mOpenDatasetIndex
protected
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::mPrecision
protected

The precision with which to write files: that is, the number of digits to use in numerical output.

Definition at line 104 of file AbstractHdf5Converter.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::string AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::mRelativeSubdirectory
protected
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
const FileFinder& AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::mrH5Folder
protected

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