diff --git a/src/core/cell/Cell.h b/src/core/cell/Cell.h index 11fa7d1d1470084c6a6701bb3e9011b771270b22..8fc8ef14e29f216f173604b667807801b49e4f83 100644 --- a/src/core/cell/Cell.h +++ b/src/core/cell/Cell.h @@ -381,3 +381,15 @@ namespace mpi } // namespace walberla + +namespace std +{ + template<> + struct hash< walberla::Cell > + { + std::size_t operator()( walberla::Cell const & cell ) const noexcept + { + return walberla::cell::hash_value( cell ); + } + }; +} // namespace std diff --git a/src/core/math/Vector2.h b/src/core/math/Vector2.h index c9b9dba4be0d8c5e38fc9296ed037e47ced1559c..03b2d1e25307e739e6a30d29f7676dd21e7b9bb6 100644 --- a/src/core/math/Vector2.h +++ b/src/core/math/Vector2.h @@ -1681,3 +1681,15 @@ namespace walberla { }; } // namespace walberla + +namespace std +{ + template<typename T> + struct hash< walberla::Vector2<T> > + { + std::size_t operator()( walberla::Vector2<T> const & v ) const noexcept + { + return walberla::Vector2<T>::hash_value( v ); + } + }; +} // namespace std diff --git a/src/core/math/Vector3.h b/src/core/math/Vector3.h index c322c1380bd5ed9e8e794ec3c255d0be03ffc8b8..7e65036ed953f7c67e182ff71029d517548827cb 100644 --- a/src/core/math/Vector3.h +++ b/src/core/math/Vector3.h @@ -1961,3 +1961,15 @@ inline bool check_float_equal_eps( const math::Vector3<real_t> & lhs, const math } } } + +namespace std +{ + template<typename T> + struct hash< walberla::Vector3<T> > + { + std::size_t operator()( walberla::Vector3<T> const & v ) const noexcept + { + return walberla::Vector3<T>::hash_value( v ); + } + }; +} // namespace std