gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
MFaceHash.h
Go to the documentation of this file.
1 // Gmsh - Copyright (C) 1997-2022 C. Geuzaine, J.-F. Remacle
2 //
3 // See the LICENSE.txt file in the Gmsh root directory for license information.
4 // Please report all issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
5 
6 #ifndef MFACE_HASH_H
7 #define MFACE_HASH_H
8 
9 #include "MFace.h"
10 #include "Hash.h"
11 
12 struct MFaceHash : public std::unary_function<MFace, size_t> {
13  size_t operator()(const MFace &f) const
14  {
15  size_t v[4] = {0, 0, 0, 0};
16  for(size_t i = 0; i < f.getNumVertices(); i++) {
17  v[i] = f.getSortedVertex(i)->getNum();
18  }
19  return HashFNV1a<sizeof(size_t[4])>::eval(v);
20  }
21 };
22 
23 #endif
LegendrePolynomials::f
void f(int n, double u, double *val)
Definition: orthogonalBasis.cpp:77
MFaceHash
Definition: MFaceHash.h:12
MFace
Definition: MFace.h:20
MFace.h
HashFNV1a
Definition: Hash.h:49
MFaceHash::operator()
size_t operator()(const MFace &f) const
Definition: MFaceHash.h:13
Hash.h