BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
belfem::HDF5 Class Reference

Hierarchical data format I/O. More...

#include <cl_HDF5.hpp>

Public Member Functions

 HDF5 (const string &aPath, const enum FileMode aMode=FileMode::NEW, const bool aParallelMode=false)
 constructor
 ~HDF5 ()
 destructor
void close ()
 close file
herr_tstatus ()
hid_t create_group (const string &aLabel)
 create a group and make it the active group
hid_t create_group (const string &aLabel, const hid_t aParent)
 create a group as a child of a given parent group.
hid_t select_group (const string &aLabel)
 open an existing group and make it the active group
void close_active_group ()
void close_tree ()
hid_t active_group () const
const stringtree () const
void save_data (const string &aLabel, const string &aValue)
 save a string into the active group
void save_data (const string &aLabel, const char *aValue)
void load_data (const string &aLabel, string &aValue)
void save_data (const string &aLabel, const sint &aValue)
 save an integer into the active group
void save_data (const string &aLabel, const uint &aValue)
 save an unsigned integer into the active group
void save_data (const string &aLabel, const luint &aValue)
 save a long unsigned integer into the active group
void save_data (const string &aLabel, const lluint &aValue)
 save a long long unsigned integer into the active group.
void save_data (const string &aLabel, const real &aValue)
 save a real into the active group
void save_data (const string &aLabel, const bool &aValue)
 save a bool into the active group
void load_data (const string &aLabel, bool &aValue)
void load_data (const string &aLabel, sint &aValue)
void load_data (const string &aLabel, uint &aValue)
void load_data (const string &aLabel, luint &aValue)
void load_data (const string &aLabel, lluint &aValue)
void load_data (const string &aLabel, real &aValue)
template<typename T>
void save_data (const string &aLabel, const Cell< T > &aCell)
template<typename T>
void load_data (const string &aLabel, Cell< T > &aCell)
template<typename T>
void save_data (const string &aLabel, const Vector< T > &aVector)
template<typename T>
void load_data (const string &aLabel, Vector< T > &aVector)
template<typename T>
void save_data (const string &aLabel, const Matrix< T > &aMatrix, const bool aTranspose=false)
template<typename T>
void load_data (const string &aLabel, Matrix< T > &aMatrix, const bool aTranspose=false)
template<typename T>
void save_data (const string &aLabel, const T *aArray, const index_t aMemorySize)
template<typename T>
void load_data (const string &aLabel, T *aArray, const index_t aMemorySize)
template<>
void save_data (const string &aLabel, const Cell< string > &aCell)
template<>
void load_data (const string &aLabel, Cell< string > &aCell)

Detailed Description

Hierarchical data format I/O.

See also
BELFEM I/O Usage Guide

Constructor & Destructor Documentation

◆ HDF5()

belfem::HDF5::HDF5 ( const string & aPath,
const enum FileMode aMode = FileMode::NEW,
const bool aParallelMode = false )

constructor

◆ ~HDF5()

belfem::HDF5::~HDF5 ( )

destructor

Member Function Documentation

◆ active_group()

hid_t belfem::HDF5::active_group ( ) const

◆ close()

void belfem::HDF5::close ( )

close file

◆ close_active_group()

void belfem::HDF5::close_active_group ( )

◆ close_tree()

void belfem::HDF5::close_tree ( )

◆ create_group() [1/2]

hid_t belfem::HDF5::create_group ( const string & aLabel)

create a group and make it the active group

create a group

◆ create_group() [2/2]

hid_t belfem::HDF5::create_group ( const string & aLabel,
const hid_t aParent )

create a group as a child of a given parent group.

The navigation state is a stack, so the parent must be the active group — the handle argument makes the intent explicit and is verified

◆ load_data() [1/12]

void belfem::HDF5::load_data ( const string & aLabel,
bool & aValue )

◆ load_data() [2/12]

template<>
void belfem::HDF5::load_data ( const string & aLabel,
Cell< string > & aCell )
inline

◆ load_data() [3/12]

template<typename T>
void belfem::HDF5::load_data ( const string & aLabel,
Cell< T > & aCell )
inline

◆ load_data() [4/12]

void belfem::HDF5::load_data ( const string & aLabel,
lluint & aValue )

◆ load_data() [5/12]

void belfem::HDF5::load_data ( const string & aLabel,
luint & aValue )

◆ load_data() [6/12]

template<typename T>
void belfem::HDF5::load_data ( const string & aLabel,
Matrix< T > & aMatrix,
const bool aTranspose = false )
inline

◆ load_data() [7/12]

void belfem::HDF5::load_data ( const string & aLabel,
real & aValue )

◆ load_data() [8/12]

void belfem::HDF5::load_data ( const string & aLabel,
sint & aValue )

◆ load_data() [9/12]

void belfem::HDF5::load_data ( const string & aLabel,
string & aValue )

◆ load_data() [10/12]

template<typename T>
void belfem::HDF5::load_data ( const string & aLabel,
T * aArray,
const index_t aMemorySize )
inline

◆ load_data() [11/12]

void belfem::HDF5::load_data ( const string & aLabel,
uint & aValue )

◆ load_data() [12/12]

template<typename T>
void belfem::HDF5::load_data ( const string & aLabel,
Vector< T > & aVector )
inline

◆ save_data() [1/13]

void belfem::HDF5::save_data ( const string & aLabel,
const bool & aValue )

save a bool into the active group

◆ save_data() [2/13]

template<>
void belfem::HDF5::save_data ( const string & aLabel,
const Cell< string > & aCell )
inline

◆ save_data() [3/13]

template<typename T>
void belfem::HDF5::save_data ( const string & aLabel,
const Cell< T > & aCell )
inline

◆ save_data() [4/13]

void belfem::HDF5::save_data ( const string & aLabel,
const char * aValue )

◆ save_data() [5/13]

void belfem::HDF5::save_data ( const string & aLabel,
const lluint & aValue )

save a long long unsigned integer into the active group.

Distinct from the luint overload on every platform: uint64_t is unsigned long on linux but unsigned long long on macOS, and without this overload the macOS spelling matches nothing.

◆ save_data() [6/13]

void belfem::HDF5::save_data ( const string & aLabel,
const luint & aValue )

save a long unsigned integer into the active group

◆ save_data() [7/13]

template<typename T>
void belfem::HDF5::save_data ( const string & aLabel,
const Matrix< T > & aMatrix,
const bool aTranspose = false )
inline

◆ save_data() [8/13]

void belfem::HDF5::save_data ( const string & aLabel,
const real & aValue )

save a real into the active group

◆ save_data() [9/13]

void belfem::HDF5::save_data ( const string & aLabel,
const sint & aValue )

save an integer into the active group

◆ save_data() [10/13]

void belfem::HDF5::save_data ( const string & aLabel,
const string & aValue )

save a string into the active group

◆ save_data() [11/13]

template<typename T>
void belfem::HDF5::save_data ( const string & aLabel,
const T * aArray,
const index_t aMemorySize )
inline

◆ save_data() [12/13]

void belfem::HDF5::save_data ( const string & aLabel,
const uint & aValue )

save an unsigned integer into the active group

◆ save_data() [13/13]

template<typename T>
void belfem::HDF5::save_data ( const string & aLabel,
const Vector< T > & aVector )
inline

◆ select_group()

hid_t belfem::HDF5::select_group ( const string & aLabel)

open an existing group and make it the active group

◆ status()

herr_t & belfem::HDF5::status ( )

◆ tree()

const string & belfem::HDF5::tree ( ) const

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