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

#include <Geometry.h>

Inheritance diagram for Nektar::SpatialDomains::GeometryHash:
Inheritance graph
[legend]
Collaboration diagram for Nektar::SpatialDomains::GeometryHash:
Collaboration graph
[legend]

Public Member Functions

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

Detailed Description

Definition at line 252 of file Geometry.h.

Member Function Documentation

std::size_t Nektar::SpatialDomains::GeometryHash::operator() ( GeometrySharedPtr const &  p) const
inline

Definition at line 254 of file Geometry.h.

255  {
256  int i;
257  size_t seed = 0;
258  int nVert = p->GetNumVerts();
259  std::vector<unsigned int> ids(nVert);
260 
261  for (i = 0; i < nVert; ++i)
262  {
263  ids[i] = p->GetVid(i);
264  }
265  std::sort(ids.begin(), ids.end());
266  boost::hash_range(seed, ids.begin(), ids.end());
267 
268  return seed;
269  }