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

#include <MeshElements.h>

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.

{
unsigned int nVert = p->m_vertexList.size();
std::size_t seed = 0;
std::vector<unsigned int> ids(nVert);
for (int i = 0; i < nVert; ++i)
{
ids[i] = p->m_vertexList[i]->m_id;
}
std::sort(ids.begin(), ids.end());
boost::hash_range(seed, ids.begin(), ids.end());
return seed;
}