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 49 #ifdef LIBMESH_ENABLE_DEPRECATED 50 template <
typename KeyType>
57 #endif // LIBMESH_ENABLE_DEPRECATED 63 template <
typename KeyType>
67 return static_cast<double>(k);
77 template <
typename KeyType>
82 return static_cast<KeyType
>(f);
89 template <
typename FirstKeyType,
typename SecondKeyType>
92 std::pair<FirstKeyType,SecondKeyType>
to_key_type (
const double f)
105 template <
typename FirstKeyType,
typename SecondKeyType>
107 double to_double (
const std::pair<FirstKeyType,SecondKeyType> &k)
113 #ifdef LIBMESH_HAVE_LIBHILBERT 119 return static_cast<double>(bvt.rack2);
125 Hilbert::HilbertIndices
128 Hilbert::HilbertIndices bvt;
132 bvt.rack2 =
static_cast<Hilbert::inttype
>(f);
137 #endif // LIBMESH_HAVE_LIBHILBERT 143 #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.
bool is_sorted(const std::vector< KeyType > &v)
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...