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

#include <Triangle.h>

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

Public Member Functions

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

Detailed Description

Hash class for high-order surfaces.

Definition at line 221 of file Triangle.h.

Member Function Documentation

std::size_t Nektar::NekMeshUtils::HOSurfHash::operator() ( HOSurfSharedPtr const &  p) const
inline

Calculate hash of a given high-order surface p by taking successive hashes of the vertex IDs.

Definition at line 227 of file Triangle.h.

228  {
229  std::size_t seed = 0;
230  std::vector<int> ids = p->vertId;
231 
232  std::sort(ids.begin(), ids.end());
233  for (int i = 0; i < ids.size(); ++i)
234  {
235  boost::hash_combine(seed, ids[i]);
236  }
237  return seed;
238  }