Wildmeshing Toolkit
wmtk::simplex::internal Namespace Reference

This class is a utility to perform breadth first search on simplices. More...

Classes

struct  HomogeneousSimplexEqualFunctor
 
struct  HomogeneousSimplexLessFunctor
 
struct  SimplexEqualFunctor
 
struct  SimplexLessFunctor
 
class  VisitedArray
 

Functions

std::vector< Tuplecoface_preserving_boundary_tuples (const Mesh &mesh, const Tuple &t, PrimitiveType pt, PrimitiveType coface_pt)
 Returns the boundary of a simplex ignoring some sorts of switches. More...
 
std::vector< Tupleboundary_with_preserved_face_tuples (const Mesh &mesh, const Tuple &t, PrimitiveType pt, PrimitiveType face_pt)
 Returns the faces (single-dimension) of a simplex that are also cofaces of a given face. More...
 
std::vector< Tupleboundary_with_preserved_face_tuples (const Mesh &mesh, const Simplex &simplex, PrimitiveType face_pt)
 Returns the faces (single-dimension) of a simplex that are also cofaces of a given face. More...
 
std::vector< Simplexboundary_with_preserved_face_simplices (const Mesh &mesh, const Tuple &t, PrimitiveType pt, PrimitiveType face_pt)
 Returns the faces (single-dimension) of a simplex that are also cofaces of a given face. More...
 
std::vector< Simplexboundary_with_preserved_face_simplices (const Mesh &mesh, const Simplex &simplex, PrimitiveType face_pt)
 Returns the faces (single-dimension) of a simplex that are also cofaces of a given face. More...
 

Detailed Description

This class is a utility to perform breadth first search on simplices.

Function Documentation

◆ boundary_with_preserved_face_simplices() [1/2]

std::vector< Simplex > wmtk::simplex::internal::boundary_with_preserved_face_simplices ( const Mesh mesh,
const Simplex simplex,
PrimitiveType  face_pt 
)

Returns the faces (single-dimension) of a simplex that are also cofaces of a given face.

Parameters
meshThe mesh containing the simplex.
simplexThe simplex whose faces we are computing.
face_ptPrimitive type of the face being preserved.
Returns
Faces of simplex that also are cofaces of the simplex(simplex.tuple(), face_pt).

Definition at line 72 of file boundary_with_preserved_face.cpp.

References boundary_with_preserved_face_simplices(), wmtk::simplex::Simplex::primitive_type(), and wmtk::simplex::Simplex::tuple().

Here is the call graph for this function:

◆ boundary_with_preserved_face_simplices() [2/2]

std::vector< Simplex > wmtk::simplex::internal::boundary_with_preserved_face_simplices ( const Mesh mesh,
const Tuple t,
PrimitiveType  pt,
PrimitiveType  face_pt 
)

Returns the faces (single-dimension) of a simplex that are also cofaces of a given face.

Say the l-simplex B is a face of a k-simplex S, then this function returns the faces of S that are also cofaces of B. B and S are encoded within a single tuple t and two primitive types pt and face_pt. The returned tuples always contain B.

This function supports cofaces_single_dimension.

Parameters
meshThe mesh containing the simplex.
tupleThe tuple of the simplex whose faces we are computing.
ptPrimitive type of the simplex whose faces we are computing.
face_ptPrimitive type of the face being preserved.
Returns
Faces of the simplex(t,pt) that also are cofaces of the simplex(t, face_pt).

Definition at line 57 of file boundary_with_preserved_face.cpp.

References boundary_with_preserved_face_tuples(), wmtk::get_primitive_type_from_id(), wmtk::get_primitive_type_id(), wmtk::simplex::utils::tuple_vector_to_homogeneous_simplex_vector(), and wmtk::Vertex.

Referenced by boundary_with_preserved_face_simplices().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ boundary_with_preserved_face_tuples() [1/2]

std::vector< Tuple > wmtk::simplex::internal::boundary_with_preserved_face_tuples ( const Mesh mesh,
const Simplex simplex,
PrimitiveType  face_pt 
)

Returns the faces (single-dimension) of a simplex that are also cofaces of a given face.

Parameters
meshThe mesh containing the simplex.
simplexThe simplex whose faces we are computing.
face_ptPrimitive type of the face being preserved.
Returns
Faces of simplex that also are cofaces of the simplex(simplex.tuple(), face_pt).

Definition at line 48 of file boundary_with_preserved_face.cpp.

References boundary_with_preserved_face_tuples(), wmtk::simplex::Simplex::primitive_type(), and wmtk::simplex::Simplex::tuple().

Here is the call graph for this function:

◆ boundary_with_preserved_face_tuples() [2/2]

std::vector< Tuple > wmtk::simplex::internal::boundary_with_preserved_face_tuples ( const Mesh mesh,
const Tuple t,
PrimitiveType  pt,
PrimitiveType  face_pt 
)

Returns the faces (single-dimension) of a simplex that are also cofaces of a given face.

Say the l-simplex B is a face of a k-simplex S, then this function returns the faces of S that are also cofaces of B. B and S are encoded within a single tuple t and two primitive types pt and face_pt. The returned tuples always contain B.

This function supports cofaces_single_dimension.

Example 1: given a triangle and a vertex that is a face of the triangle, this function computes the edges that are faces of the triangle and also cofaces of the vertex.

Example 2: given a tetrahedron and a vertex that is a face of the tetrahedron, this function computes the triangles that are faces of the tetrahedron and also cofaces of the vertex.

Example 3: given a tetrahedron and an edge that is a face of the tetrahedron, this function computes the triangles that are faces of the tetrahedron and also cofaces of the edge.

Parameters
meshThe mesh containing the simplex.
tupleThe tuple of the simplex whose faces we are computing.
ptPrimitive type of the simplex whose faces we are computing.
face_ptPrimitive type of the face being preserved.
Returns
Faces of the simplex(t,pt) that also are cofaces of the simplex(t, face_pt).

Definition at line 7 of file boundary_with_preserved_face.cpp.

References wmtk::Edge, wmtk::PE, PF, PT, wmtk::PV, wmtk::Mesh::switch_tuples(), wmtk::Tetrahedron, wmtk::Triangle, and wmtk::Vertex.

Referenced by boundary_with_preserved_face_simplices(), boundary_with_preserved_face_tuples(), and wmtk::simplex::cofaces_single_dimension_tuples().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ coface_preserving_boundary_tuples()

std::vector<Tuple> wmtk::simplex::internal::coface_preserving_boundary_tuples ( const Mesh mesh,
const Tuple t,
PrimitiveType  pt,
PrimitiveType  coface_pt 
)

Returns the boundary of a simplex ignoring some sorts of switches.

Say the input k-simplex S is a coface of a l-simplex B. Then this function returns the boundary simplices of S that are still cofaces. Because preserving being a coface of B does not require tracking B itself, but just its dimension l we pass in a primitive type instead. This function supports cofaces_single_dimension.

Parameters
meshThe mesh containing the simplex
tupleThe tuple of the simplex
ptprimitive type of the simplex
coface_ptprimitive type of the coface
Returns
boundary of the tuple