Wildmeshing Toolkit
Loading...
Searching...
No Matches
SimplexComparisons.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <wmtk/Mesh.hpp>
6namespace wmtk {
7class Mesh;
8}
9
10namespace wmtk::simplex::utils {
12{
13public:
14 /* @brief checks if simplex objects represent the same simplex
15 * @param m the mesh these simplices belong to
16 * @param s0 the first simplex compared
17 * @param s1 the second simplex compared
18 * @return true if two simplices are the same
19 * */
20 static bool equal(const Mesh& m, const Simplex& s0, const Simplex& s1);
21
22 /* @brief checks if simplex objects represent the same simplex
23 * @param m the mesh these simplices belong to
24 * @param a the first simplex compared's tuple
25 * @param a_pt the first simplex compared's primitive type
26 * @param b the second simplex compared's tuple
27 * @param b_pt the second simplex compared's primitive_type
28 * @return true if two simplices are the same
29 * */
30 static bool
31 equal(const Mesh& m, const Tuple& a, PrimitiveType a_pt, const Tuple& b, PrimitiveType b_pt);
32
33 /* @brief checks if simplex objects of the same dimension represent the same simplex
34 * @param m the mesh these simplices belong to
35 * @param primitive_type the primitive type of the two simplices
36 * @param a the first simplex compared's tuple
37 * @param b the second simplex compared's tuple
38 * @return true if two simplices are the same
39 * */
40 static bool equal(const Mesh& m, PrimitiveType primitive_type, const Tuple& a, const Tuple& b);
41
42 static bool equal(const Mesh& m, const IdSimplex& s0, const IdSimplex& s1);
43
44
45 /* @brief checks if simplex objects are less than one another
46 *
47 * uses lexicgoraphic order of (primtiive type, id)
48 *
49 * @param m the mesh these simplices belong to
50 * @param s0 the first simplex compared
51 * @param s1 the second simplex compared
52 * @return true if two simplices are the same
53 * */
54 static bool less(const Mesh& m, const Simplex& s0, const Simplex& s1);
55
56 static bool less(const Mesh& m, const IdSimplex& s0, const IdSimplex& s1);
57 /* @brief checks if simplex objects are less than one another
58 *
59 * uses lexicgoraphic order of (primtiive type, id)
60 *
61 * @param m the mesh these simplices belong to
62 * @param a the first simplex compared's tuple
63 * @param a_pt the first simplex compared's primitive type
64 * @param b the second simplex compared's tuple
65 * @param b_pt the second simplex compared's primitive_type
66 * @return true if two simplices are the same
67 * */
68 static bool
69 less(const Mesh& m, const Tuple& a, PrimitiveType a_pt, const Tuple& b, PrimitiveType b_pt);
70 /* @brief checks if simplex objects are less than one another
71 *
72 * uses lexicgoraphic order of (primtiive type, id)
73 *
74 * @param m the mesh these simplices belong to
75 * @param primitive_type the primitive type of the two simplices
76 * @param a the first simplex compared's tuple
77 * @param b the second simplex compared's tuple
78 * @return true if two simplices are the same
79 * */
80 static bool less(const Mesh& m, PrimitiveType primitive_type, const Tuple& a, const Tuple& b);
81};
82} // namespace wmtk::simplex::utils
The Tuple is the basic navigation tool in our mesh data structure.
Definition Tuple.hpp:19
static bool equal(const Mesh &m, const Simplex &s0, const Simplex &s1)
static bool less(const Mesh &m, const Simplex &s0, const Simplex &s1)