Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 385 of file Face.h.

Member Function Documentation

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

Definition at line 387 of file Face.h.

388  {
389  unsigned int nVert = p->m_vertexList.size();
390  std::size_t seed = 0;
391  std::vector<unsigned int> ids(nVert);
392 
393  for (int i = 0; i < nVert; ++i)
394  {
395  ids[i] = p->m_vertexList[i]->m_id;
396  }
397 
398  std::sort(ids.begin(), ids.end());
399  boost::hash_range(seed, ids.begin(), ids.end());
400 
401  return seed;
402  }