Nektar++
Public Member Functions | List of all members
Nektar::Utilities::NodeHash Struct Reference

Defines a hash function for nodes. More...

#include <MeshElements.h>

Inheritance diagram for Nektar::Utilities::NodeHash:
Inheritance graph
[legend]
Collaboration diagram for Nektar::Utilities::NodeHash:
Collaboration graph
[legend]

Public Member Functions

std::size_t operator() (NodeSharedPtr const &p) const
 

Detailed Description

Defines a hash function for nodes.

The hash of a node is straight-forward; a combination of the x, y, and z co-ordinates in this order.

Definition at line 207 of file MeshElements.h.

Member Function Documentation

std::size_t Nektar::Utilities::NodeHash::operator() ( NodeSharedPtr const &  p) const
inline

Definition at line 209 of file MeshElements.h.

210  {
211  std::size_t seed = 0;
212  boost::hash_combine(seed, p->m_x);
213  boost::hash_combine(seed, p->m_y);
214  boost::hash_combine(seed, p->m_z);
215  return seed;
216  }