20 #ifndef LIBMESH_PARALLEL_CONVERSION_UTILS_H
21 #define LIBMESH_PARALLEL_CONVERSION_UTILS_H
24 #include "libmesh/libmesh_common.h"
25 #include "libmesh/int_range.h"
27 #ifdef LIBMESH_HAVE_LIBHILBERT
50 template <
typename KeyType>
68 template <
typename KeyType>
72 return static_cast<double>(k);
82 template <
typename KeyType>
87 return static_cast<KeyType>(f);
94 template <
typename FirstKeyType,
typename SecondKeyType>
97 std::pair<FirstKeyType,SecondKeyType>
to_key_type (
const double f)
110 template <
typename FirstKeyType,
typename SecondKeyType>
112 double to_double (
const std::pair<FirstKeyType,SecondKeyType> &k)
118 #ifdef LIBMESH_HAVE_LIBHILBERT
124 return static_cast<double>(bvt.rack2);
130 Hilbert::HilbertIndices
133 Hilbert::HilbertIndices bvt;
137 bvt.rack2 = static_cast<Hilbert::inttype>(f);
142 #endif // LIBMESH_HAVE_LIBHILBERT
148 #endif // LIBMESH_PARALLEL_CONVERSION_UTILS_H