8#include <unordered_set>
9#include <unordered_map>
16#include "geometry/point.h"
17#include "geometry/edge.h"
30 std::array<size_t, 4>
v;
48 std::array<size_t, 4> sortedV1 =
v;
49 std::array<size_t, 4> sortedV2 = other.
v;
50 std::sort(sortedV1.begin(), sortedV1.end());
51 std::sort(sortedV2.begin(), sortedV2.end());
52 return sortedV1 == sortedV2;
60 size_t operator()(
const Quad& quad)
const {
62 size_t h = std::hash<size_t>{}(quad.
v[0]);
63 h ^= std::hash<size_t>{}(quad.
v[1]) + 0x9e3779b9 + (h << 6) + (h >> 2);
64 h ^= std::hash<size_t>{}(quad.
v[2]) + 0x9e3779b9 + (h << 6) + (h >> 2);
65 h ^= std::hash<size_t>{}(quad.
v[3]) + 0x9e3779b9 + (h << 6) + (h >> 2);
A hash function for quads.
Definition quad.h:59
A struct representing a quad in the mesh.
Definition quad.h:25
static constexpr size_t numVertices
Number of vertices in a quad.
Definition quad.h:28
static constexpr size_t elementType
Gmsh element type for quads.
Definition quad.h:27
bool containsEdge(size_t v1, size_t v2) const
Check if the circum circle of the quad contains a specific edge defined by two vertex indices.
Definition quad.cpp:5
std::array< size_t, 4 > v
Indices of the vertices that form the quad.
Definition quad.h:30
bool operator==(const Quad &other) const
Overload the == operator to compare two quads based on their vertex indices.
Definition quad.h:47