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

#include <InputNek.h>

Inheritance diagram for Nektar::Utilities::HOSurfHash:
Inheritance graph
[legend]
Collaboration diagram for Nektar::Utilities::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 57 of file InputNek.h.

Member Function Documentation

std::size_t Nektar::Utilities::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 63 of file InputNek.h.

64  {
65  std::size_t seed = 0;
66  std::vector<int> ids = p->vertId;
67  std::sort(ids.begin(), ids.end());
68  for (int i = 0; i < ids.size(); ++i)
69  {
70  boost::hash_combine(seed, ids[i]);
71  }
72  return seed;
73  }