|
IFEM
90A354
|
Read data from a HDF5 file. More...
#include <HDF5Reader.h>


Public Member Functions | |
| HDF5Reader (const std::string &name, const ProcessAdm &adm) | |
| The constructor opens a named HDF5-file. More... | |
| bool | readVector (const std::string &path, std::vector< int > &vec) |
| Reads an integer vector. More... | |
| bool | readVector (const std::string &path, std::vector< double > &vec) |
| Reads an double precision vector. More... | |
| bool | readDouble (const std::string &name, double &out) |
| Reads a single double value. More... | |
| bool | readString (const std::string &name, std::string &out) |
| Reads a text string. More... | |
| bool | read3DArray (const std::string &name, Matrix3D &data) |
| Reads a 3D array. More... | |
| int | getFieldSize (const std::string &fieldPath) |
| Returns number of patches for a field. More... | |
Public Member Functions inherited from HDF5Base | |
| HDF5Base (const std::string &name, const ProcessAdm &adm) | |
| The constructor opens a named HDF5-file. More... | |
| virtual | ~HDF5Base () |
| The destructor closes the file. | |
Additional Inherited Members | |
Protected Member Functions inherited from HDF5Base | |
| bool | openFile (unsigned int flag) |
| Opens the HDF5 file. More... | |
| void | closeFile () |
| Closes the HDF5 file. | |
Protected Attributes inherited from HDF5Base | |
| std::string | m_hdf5_name |
| The file name of the HDF5 file. | |
Read data from a HDF5 file.
| HDF5Reader::HDF5Reader | ( | const std::string & | name, |
| const ProcessAdm & | adm | ||
| ) |
The constructor opens a named HDF5-file.
| [in] | name | The name (without extension) of the data file |
| [in] | adm | The process administrator |
| int HDF5Reader::getFieldSize | ( | const std::string & | fieldPath | ) |
Returns number of patches for a field.
| [in] | fieldPath | Path to field in hdf5 file |
References HDF5Base::openFile().
Referenced by FieldFuncHDF5::load(), and SIMinput::setInitialCondition().
| bool HDF5Reader::read3DArray | ( | const std::string & | name, |
| Matrix3D & | data | ||
| ) |
Reads a 3D array.
| [in] | name | The name (path in HDF5 file) to the string |
| [out] | data | The 3D array to read data into |
References HDF5Base::openFile(), and utl::matrix3d< T >::resize().
Referenced by TextureProperties::parse().
| bool HDF5Reader::readDouble | ( | const std::string & | name, |
| double & | out | ||
| ) |
Reads a single double value.
| [in] | name | The name (path in HDF5 file) to the string |
| [out] | out | The double to read data into |
References HDF5Base::openFile().
Referenced by FieldFuncHDF5::findClosestLevel().
| bool HDF5Reader::readString | ( | const std::string & | name, |
| std::string & | out | ||
| ) |
Reads a text string.
| [in] | name | The name (path in HDF5 file) to the string |
| [out] | out | The string to read data into |
References HDF5Base::openFile().
Referenced by FieldFuncHDF5::load(), and SIMinput::setInitialCondition().
| bool HDF5Reader::readVector | ( | const std::string & | path, |
| std::vector< double > & | vec | ||
| ) |
Reads an double precision vector.
| [in] | path | The path to the dataset to read |
| [out] | vec | The vector to read data into |
References HDF5Base::openFile().
| bool HDF5Reader::readVector | ( | const std::string & | path, |
| std::vector< int > & | vec | ||
| ) |
Reads an integer vector.
Helper for reading data from HDF5 file.
| [in] | path | The path to the dataset to read |
| [out] | vec | The vector to read data into |
References HDF5Base::openFile().
Referenced by FieldFuncHDF5::load(), and SIMinput::setInitialCondition().