Wildmeshing Toolkit
faces.cpp
Go to the documentation of this file.
1 #include "faces.hpp"
2 #include "boundary.hpp"
3 
5 
7 
8 
9 namespace wmtk::simplex {
10 SimplexCollection faces(const Mesh& mesh, const Simplex& simplex, const bool sort_and_clean)
11 {
12  SimplexCollection collection(mesh);
13 
14  faces(collection, simplex, sort_and_clean);
15 
16  return collection;
17 }
18 
19 void faces(SimplexCollection& simplex_collection, const Simplex& simplex, const bool sort_and_clean)
20 {
22  for (size_t i = 1; i < primitive_range.size(); ++i) {
23  faces_single_dimension(simplex_collection, simplex, primitive_range[i]);
24  }
25 
26 
27  if (sort_and_clean) {
28  simplex_collection.sort_and_clean();
29  }
30 }
31 
32 } // namespace wmtk::simplex
void sort_and_clean()
Sort simplex vector and remove duplicates.
PrimitiveType primitive_type() const
Definition: Simplex.hpp:51
SimplexCollection faces_single_dimension(const Mesh &mesh, const Simplex &simplex, const PrimitiveType face_type)
Returns a vector with all faces in the boundary of a simplex of the given dimension.
SimplexCollection faces(const Mesh &mesh, const Simplex &simplex, const bool sort_and_clean)
Returns all faces of a simplex.
Definition: faces.cpp:10
std::vector< PrimitiveType > primitive_range(PrimitiveType pt0, PrimitiveType pt1)
std::vector< PrimitiveType > primitive_below(PrimitiveType pt, bool lower_to_upper)