Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | List of all members
Nektar::NekMeshUtils::FaceHash Struct Reference

#include <Face.h>

Inheritance diagram for Nektar::NekMeshUtils::FaceHash:
Inheritance graph
[legend]
Collaboration diagram for Nektar::NekMeshUtils::FaceHash:
Collaboration graph
[legend]

Public Member Functions

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

Detailed Description

Definition at line 155 of file Face.h.

Member Function Documentation

std::size_t Nektar::NekMeshUtils::FaceHash::operator() ( FaceSharedPtr const &  p) const
inline

Definition at line 157 of file Face.h.

158  {
159  unsigned int nVert = p->m_vertexList.size();
160  std::size_t seed = 0;
161  std::vector<unsigned int> ids(nVert);
162 
163  for (int i = 0; i < nVert; ++i)
164  {
165  ids[i] = p->m_vertexList[i]->m_id;
166  }
167 
168  std::sort(ids.begin(), ids.end());
169  boost::hash_range(seed, ids.begin(), ids.end());
170 
171  return seed;
172  }