Chaste
Release::2018.1
|
#include <AbstractHdf5Converter.hpp>
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 FileFinder & | mrH5Folder |
boost::shared_ptr< Hdf5DataReader > | mpReader |
unsigned | mNumVariables |
std::string | mFileBaseName |
std::vector< std::string > | mDatasetNames |
unsigned | mOpenDatasetIndex |
AbstractTetrahedralMesh < ELEMENT_DIM, SPACE_DIM > * | mpMesh |
OutputFileHandler * | mpOutputFileHandler |
std::string | mRelativeSubdirectory |
unsigned | mPrecision |
Private Member Functions | |
void | GenerateListOfDatasets (const FileFinder &rH5Folder, const std::string &rFileName) |
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.
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.
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 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.
AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::~AbstractHdf5Converter | ( | ) |
Destructor.
Definition at line 109 of file AbstractHdf5Converter.cpp.
|
private |
Have a look in the HDF5 file and generate a list of the datasets that it contains.
rH5Folder | The directory the h5 file is in. |
rFileName | The name of the h5 file. |
Definition at line 157 of file AbstractHdf5Converter.cpp.
References FileFinder::GetAbsolutePath().
Referenced by AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::AbstractHdf5Converter().
std::string AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::GetSubdirectory | ( | ) |
Definition at line 115 of file AbstractHdf5Converter.cpp.
Referenced by AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::CloseFilesAndPostProcess().
|
protected |
Close the existing dataset and open a new one.
This method deletes the existing mpDataReader, and opens a new one for the new dataset.
Definition at line 121 of file AbstractHdf5Converter.cpp.
References EXCEPTION, and UNSIGNED_UNSET.
Referenced by AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::AbstractHdf5Converter(), Hdf5ToCmguiConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToCmguiConverter(), Hdf5ToMeshalyzerConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToMeshalyzerConverter(), and Hdf5ToVtkConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToVtkConverter().
void AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::WriteInfoFile | ( | ) |
Wrtie the unlimited dimension information to file.
Definition at line 72 of file AbstractHdf5Converter.cpp.
References PetscTools::AmMaster(), DOUBLE_UNSET, and ChasteBuildInfo::GetProvenanceString().
|
protected |
The datasets that we are working with.
'Data' is a special case and handled slightly differently as all variables use the same 'time'.
Definition at line 81 of file AbstractHdf5Converter.hpp.
Referenced by Hdf5ToCmguiConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToCmguiConverter().
|
protected |
Base name for the files: [basename].vtu, [basename].dat etc.
Definition at line 73 of file AbstractHdf5Converter.hpp.
Referenced by AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::AbstractHdf5Converter().
|
protected |
Number of variables to output. Read from the reader.
Definition at line 70 of file AbstractHdf5Converter.hpp.
Referenced by Hdf5ToTxtConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToTxtConverter(), and Hdf5ToVtkConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToVtkConverter().
|
protected |
The index of the dataset that is currently open.
Definition at line 86 of file AbstractHdf5Converter.hpp.
Referenced by Hdf5ToCmguiConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToCmguiConverter().
|
protected |
Pointer to a mesh.
Definition at line 89 of file AbstractHdf5Converter.hpp.
Referenced by Hdf5ToCmguiConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToCmguiConverter(), Hdf5ToMeshalyzerConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToMeshalyzerConverter(), and Hdf5ToVtkConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToVtkConverter().
|
protected |
Initialised as the directory in which to store the results.
Definition at line 92 of file AbstractHdf5Converter.hpp.
Referenced by AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::AbstractHdf5Converter().
|
protected |
Pointer to reader of the dataset to be converted.
Definition at line 67 of file AbstractHdf5Converter.hpp.
Referenced by Hdf5ToCmguiConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToCmguiConverter(), Hdf5ToMeshalyzerConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToMeshalyzerConverter(), Hdf5ToTxtConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToTxtConverter(), Hdf5ToVtkConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToVtkConverter(), and Hdf5ToXdmfConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToXdmfConverter().
|
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.
|
protected |
Get the subdirectory in which the converted output is stored, relative to the input directory.
Definition at line 98 of file AbstractHdf5Converter.hpp.
Referenced by AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::AbstractHdf5Converter(), Hdf5ToMeshalyzerConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToMeshalyzerConverter(), Hdf5ToTxtConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToTxtConverter(), and Hdf5ToVtkConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToVtkConverter().
|
protected |
Folder that the h5 file to convert resides in
Definition at line 64 of file AbstractHdf5Converter.hpp.
Referenced by AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::AbstractHdf5Converter().