Wildmeshing Toolkit
RawSimplex.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <array>
4 #include <vector>
5 #include <wmtk/Mesh.hpp>
6 #include <wmtk/Tuple.hpp>
7 
8 namespace wmtk::simplex {
9 class Simplex;
10 class RawSimplexCollection;
11 
20 {
21 public:
22  RawSimplex() = default;
23 
24  RawSimplex(const Mesh& mesh, const std::vector<Tuple>& vertices);
25 
26  RawSimplex(std::vector<int64_t>&& vertices);
27 
28  RawSimplex(const Mesh& mesh, const Simplex& simplex);
29 
30  int64_t dimension() const;
31 
32  bool operator==(const RawSimplex& o) const;
33  bool operator<(const RawSimplex& o) const;
34 
43  RawSimplex opposite_face(const int64_t excluded_id);
44 
54  RawSimplex opposite_face(const Mesh& mesh, const Tuple& vertex);
55 
65  RawSimplex opposite_face(const RawSimplex& face);
66 
71 
72 private:
73  std::vector<int64_t> m_vertices;
74 };
75 
76 } // namespace wmtk::simplex
A meshless implementation of the simplex that just stores an array of ids.
Definition: RawSimplex.hpp:20
std::vector< int64_t > m_vertices
Definition: RawSimplex.hpp:73
bool operator==(const RawSimplex &o) const
Definition: RawSimplex.cpp:43
RawSimplex opposite_face(const int64_t excluded_id)
Get the face opposite to the given vertex.
Definition: RawSimplex.cpp:65
RawSimplexCollection faces()
Get all faces of the simplex.
Definition: RawSimplex.cpp:111
int64_t dimension() const
Definition: RawSimplex.cpp:38
bool operator<(const RawSimplex &o) const
Definition: RawSimplex.cpp:52
std::vector< Tuple > vertices(const Mesh &m, const Simplex &simplex)