Alsvinn  0.5.3
The fast FVM simulator with UQ support
Classes | Namespaces | Macros
hdf5_utils.hpp File Reference
#include "alsutils/error/Exception.hpp"
#include <hdf5.h>

Go to the source code of this file.

Classes

class  alsfvm::io::HDF5Resource
 The HDF5Resource class is a unique_ptr for hdf5 resources. More...
 

Namespaces

 alsfvm
 Various utility functions to implement the tecno flux.
 
 alsfvm::io
 

Macros

#define HDF5_SAFE_CALL(x)
 
#define HDF5_MAKE_RESOURCE(holder, expression, closer)
 

Macro Definition Documentation

◆ HDF5_MAKE_RESOURCE

#define HDF5_MAKE_RESOURCE (   holder,
  expression,
  closer 
)
Value:
{ \
auto hidValue = expression; \
if (hidValue < 0) { \
THROW("HDF5 error in running\n\t" << #expression \
<<"\n\n" << __FILE__ << ": " << __LINE__); \
} \
else { \
holder.reset(new HDF5Resource(hidValue, closer)); \
} \
}

Convience macro. Runs expression, test the return value Throws an exception if return value is negative

◆ HDF5_SAFE_CALL

#define HDF5_SAFE_CALL (   x)
Value:
{\
if (x < 0) { \
THROW("HDF5 error, call looked like: " << #x); \
} \
}

This file contains various utility functions for HDF5