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

#include <InputNek.h>

Public Member Functions

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

Detailed Description

Hash class for high-order surfaces.

Definition at line 84 of file InputNek.h.

Member Function Documentation

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

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

Definition at line 90 of file InputNek.h.

std::size_t seed = 0;
std::vector<unsigned int> ids = p->vertId;
std::sort(ids.begin(), ids.end());
for (int i = 0; i < ids.size(); ++i)
boost::hash_combine(seed, ids[i]);
return seed;