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

#include <MeshElements.h>

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

Public Member Functions

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

Detailed Description

Definition at line 555 of file MeshElements.h.

Member Function Documentation

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

Definition at line 557 of file MeshElements.h.

558  {
559  unsigned int nVert = p->m_vertexList.size();
560  std::size_t seed = 0;
561  std::vector<unsigned int> ids(nVert);
562 
563  for (int i = 0; i < nVert; ++i)
564  {
565  ids[i] = p->m_vertexList[i]->m_id;
566  }
567 
568  std::sort(ids.begin(), ids.end());
569  boost::hash_range(seed, ids.begin(), ids.end());
570 
571  return seed;
572  }