Wildmeshing Toolkit
Loading...
Searching...
No Matches
faces.cpp
Go to the documentation of this file.
1
#include "
faces.hpp
"
2
#include "
boundary.hpp
"
3
4
#include <
wmtk/utils/primitive_range.hpp
>
5
6
#include "
faces_single_dimension.hpp
"
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
{
21
const
auto
primitive_range =
wmtk::utils::primitive_below
(simplex.
primitive_type
());
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
boundary.hpp
wmtk::Mesh
Definition
Mesh.hpp:95
wmtk::simplex::SimplexCollection
Definition
SimplexCollection.hpp:11
wmtk::simplex::SimplexCollection::sort_and_clean
void sort_and_clean()
Sort simplex vector and remove duplicates.
Definition
SimplexCollection.cpp:68
wmtk::simplex::Simplex
Definition
Simplex.hpp:22
wmtk::simplex::Simplex::primitive_type
PrimitiveType primitive_type() const
Definition
Simplex.hpp:51
faces.hpp
faces_single_dimension.hpp
wmtk::simplex
Definition
Cell.hpp:7
wmtk::simplex::faces_single_dimension
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.
Definition
faces_single_dimension.cpp:189
wmtk::simplex::faces
SimplexCollection faces(const Mesh &mesh, const Simplex &simplex, const bool sort_and_clean)
Returns all faces of a simplex.
Definition
faces.cpp:10
wmtk::utils::primitive_below
auto primitive_below()
Definition
primitive_range_iter.hpp:107
primitive_range.hpp
src
wmtk
simplex
faces.cpp
Generated by
1.9.8