diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2010-08-24 12:04:51 -0400 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2011-12-14 18:21:12 +0000 |
commit | a62e8ee3f1e86100cda633f51c22ee063e28df76 (patch) | |
tree | 96c4522bba984cfb4a1e53ce75733d6cdbf08c01 /CarpetDev/CarpetIOF5_standalone/src/utils.hh | |
parent | eb813afcef1be0aba7154fe41d21e4a7657371ad (diff) |
CarpetIOF5: Rename old thorn
Diffstat (limited to 'CarpetDev/CarpetIOF5_standalone/src/utils.hh')
-rw-r--r-- | CarpetDev/CarpetIOF5_standalone/src/utils.hh | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/CarpetDev/CarpetIOF5_standalone/src/utils.hh b/CarpetDev/CarpetIOF5_standalone/src/utils.hh new file mode 100644 index 000000000..8d9d0a925 --- /dev/null +++ b/CarpetDev/CarpetIOF5_standalone/src/utils.hh @@ -0,0 +1,93 @@ +#ifndef UTILS_HH +#define UTILS_HH + +#include <hdf5.h> + +#include "cctk.h" + +#include "vect.hh" + + + +namespace CarpetIOF5 { + + namespace F5 { + + hid_t + hdf5_datatype_from_dummy (signed char const & dummy); + hid_t + hdf5_datatype_from_dummy (short const & dummy); + hid_t + hdf5_datatype_from_dummy (int const & dummy); + hid_t + hdf5_datatype_from_dummy (long const & dummy); + hid_t + hdf5_datatype_from_dummy (long long const & dummy); + hid_t + hdf5_datatype_from_dummy (float const & dummy); + hid_t + hdf5_datatype_from_dummy (double const & dummy); + hid_t + hdf5_datatype_from_dummy (long double const & dummy); +#ifdef HAVE_CCTK_COMPLEX8 + hid_t + hdf5_datatype_from_dummy (CCTK_COMPLEX8 const & dummy); +#endif +#ifdef HAVE_CCTK_COMPLEX16 + hid_t + hdf5_datatype_from_dummy (CCTK_COMPLEX16 const & dummy); +#endif +#ifdef HAVE_CCTK_COMPLEX32 + hid_t + hdf5_datatype_from_dummy (CCTK_COMPLEX32 const & dummy); +#endif + + template<typename T, typename R> + hid_t + hdf5_complex_datatype_from_dummy (T const & dummy, R const & real); + + hid_t + hdf5_datatype_from_cactus_datatype (int cactus_datatype); + + + + template <typename T, int D> + string + name_from_ivect (vect <T, D> const & ivect); + + template <typename T, int D> + string + name_from_ibbox (bbox <T, D> const & ibbox); + + + + hid_t + open_or_create_group (hid_t where, + char const * name); + + + + template<typename T> + void + write_or_check_attribute (hid_t where, + char const * name, + T const * values, + int num_values); + + template<typename T> + void + write_or_check_attribute (hid_t where, + char const * name, + T const & value); + + template<typename T, int D> + void + write_or_check_attribute (hid_t where, + char const * name, + vect<T,D> const & value); + + } // namespace F5 + +} // namespace CarpetIOF5 + +#endif // #ifndef UTILS_HH |