16 return open_star(
static_cast<const TriMesh&
>(mesh), simplex, sort_and_clean);
18 return open_star(
static_cast<const TetMesh&
>(mesh), simplex, sort_and_clean);
21 default:
return open_star_slow(mesh, simplex, sort_and_clean);
break;
30 std::vector<Simplex> all_cofaces;
33 all_cofaces.reserve(cell_tuples.size() * 3 + 1);
34 for (
const Tuple& t : cell_tuples) {
41 all_cofaces.reserve(cell_tuples.size() + 1);
42 for (
const Tuple& t : cell_tuples) {
50 all_cofaces.emplace_back(simplex);
72 std::vector<Simplex> all_cofaces;
75 all_cofaces.reserve(cell_tuples.size() * 7 + 1);
76 for (
Tuple t : cell_tuples) {
89 all_cofaces.reserve(cell_tuples.size() * 3 + 1);
90 for (
const Tuple& t : cell_tuples) {
97 all_cofaces.reserve(3);
98 assert(cell_tuples.size() <= 2);
99 for (
const Tuple& t : cell_tuples) {
106 all_cofaces.emplace_back(simplex);
111 if (sort_and_clean) {
123 collection.
add(simplex);
129 collection.
add(coface_cell);
135 collection.
add(boundary_simplex);
140 if (sort_and_clean) {
Tuple switch_tuples(const Tuple &tuple, const ContainerType &op_sequence) const
Performs a sequence of switch_tuple operations in the order specified in op_sequence.
PrimitiveType top_simplex_type() const
Tuple switch_face(const Tuple &tuple) const
Tuple switch_edge(const Tuple &tuple) const
void add(const Simplex &simplex)
Add simplex to the collection.
bool contains(const Simplex &simplex) const
Check if simplex is contained in collection.
const std::vector< Simplex > & simplex_vector() const
Return const reference to the simplex vector.
void sort_and_clean()
Sort simplex vector and remove duplicates.
static Simplex face(const Mesh &m, const Tuple &t)
static Simplex edge(const Mesh &m, const Tuple &t)
static Simplex tetrahedron(const Mesh &m, const Tuple &t)
PrimitiveType primitive_type() const
constexpr wmtk::PrimitiveType PT
constexpr wmtk::PrimitiveType PF
void top_dimension_cofaces_tuples(const PointMesh &mesh, const Simplex &simplex, SimplexCollection &collection)
SimplexCollection open_star(const Mesh &mesh, const Simplex &simplex, const bool sort_and_clean)
void top_dimension_cofaces(const Simplex &simplex, SimplexCollection &simplex_collection, const bool sort_and_clean)
Get all top dimension cofaces of the given simplex.
SimplexCollection open_star_slow(const Mesh &mesh, const Simplex &simplex, const bool sort_and_clean)
SimplexCollection faces(const Mesh &mesh, const Simplex &simplex, const bool sort_and_clean)
Returns all faces of a simplex.
void log_and_throw_error(const std::string &msg)
constexpr PrimitiveType PV
constexpr PrimitiveType PE