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 160 of file Face.h.

Member Function Documentation

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

Definition at line 162 of file Face.h.

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