AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <AbstractHdf5Converter.hpp>

Inherited by Hdf5ToCmguiConverter< ELEMENT_DIM, SPACE_DIM >, Hdf5ToMeshalyzerConverter< ELEMENT_DIM, SPACE_DIM >, Hdf5ToTxtConverter< ELEMENT_DIM, SPACE_DIM >, Hdf5ToVtkConverter< ELEMENT_DIM, SPACE_DIM >, and Hdf5ToXdmfConverter< ELEMENT_DIM, SPACE_DIM >.

Collaboration diagram for AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >:
Collaboration graph
[legend]

List of all members.

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 
) [inline]

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

Note:
This method is collective, and must be called by all processes.
Parameters:
rInputDirectory The input directory, where the .h5 file to post-process is.
rFileBaseName The base name of the data file.
pMesh Pointer to the mesh.
rSubdirectoryName Name for the output directory to be created (relative to inputDirectory).
precision The number of digits to use in numerical output to file.

Definition at line 52 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 (  )  [inline]

Member Function Documentation

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

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

Parameters:
rH5Folder The directory the h5 file is in.
rFileName The name of the h5 file.

Definition at line 159 of file AbstractHdf5Converter.cpp.

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

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

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

Definition at line 117 of file AbstractHdf5Converter.cpp.

References AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::mRelativeSubdirectory.

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::MoveOntoNextDataset (  )  [inline, protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::WriteInfoFile (  )  [inline]

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>
AbstractTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::mpMesh [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
OutputFileHandler* AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::mpOutputFileHandler [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
boost::shared_ptr<Hdf5DataReader> AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::mpReader [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.

Referenced by Hdf5ToMeshalyzerConverter< ELEMENT_DIM, SPACE_DIM >::Write(), and Hdf5ToCmguiConverter< ELEMENT_DIM, SPACE_DIM >::Write().

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:

Generated by  doxygen 1.6.2