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 47 template <
typename KeyType>
51 return static_cast<double>(k);
61 template <
typename KeyType>
66 return static_cast<KeyType
>(f);
73 template <
typename FirstKeyType,
typename SecondKeyType>
76 std::pair<FirstKeyType,SecondKeyType>
to_key_type (
const double f)
89 template <
typename FirstKeyType,
typename SecondKeyType>
91 double to_double (
const std::pair<FirstKeyType,SecondKeyType> &k)
97 #ifdef LIBMESH_HAVE_LIBHILBERT 103 return static_cast<double>(bvt.rack2);
109 Hilbert::HilbertIndices
112 Hilbert::HilbertIndices bvt;
116 bvt.rack2 =
static_cast<Hilbert::inttype
>(f);
121 #endif // LIBMESH_HAVE_LIBHILBERT 127 #endif // LIBMESH_PARALLEL_CONVERSION_UTILS_H
static Hilbert::HilbertIndices to_key_type(const double f)
The libMesh namespace provides an interface to certain functionality in the library.
static std::pair< FirstKeyType, SecondKeyType > to_key_type(const double f)
A utility to convert a double to some sort of KeyType, for interpreting how histogram bounds relate t...
static KeyType to_key_type(const double f)
double to_double(const KeyType &k)
A utility function which converts whatever KeyType is to a double for the histogram bounds...