Wildmeshing Toolkit
Loading...
Searching...
No Matches
BoundaryChecker.hpp
Go to the documentation of this file.
1#pragma once
3#include <wmtk/Mesh.hpp>
4#include <vector>
5
6namespace wmtk {
7class Mesh;
8class Tuple;
9namespace simplex {
10class Simplex;
11}
12} // namespace wmtk
13namespace wmtk::multimesh {
14 // checks whether a simplex is on the boundary using multimesh
15 // youo must manually add meshes as you want to check for boundaryness (and ignore others)
16 // the is_boundary is determined in two ways:
17 // when compared to a mesh of equal or higher dimension this checks if the chosen simplex is on the boundary of that mesh
18 // when compared to a mesh of lesser dimension then it checks if the simplex is mappable at all
20{
21public:
22 BoundaryChecker() = default;
27
28 static BoundaryChecker for_all_meshes(const Mesh& m);
29
30 template <typename... Args>
31 BoundaryChecker(const Mesh& m, Args&&... args);
32 void add_mesh(const Mesh& m);
33
34 bool is_boundary(const Mesh& m, const wmtk::simplex::Simplex& simplex) const;
35 bool is_boundary(const Mesh& m, const wmtk::PrimitiveType pt, const wmtk::Tuple& simplex) const;
36
37private:
38 std::vector<const Mesh*> m_meshes;
39};
40
41template <typename... Args>
42BoundaryChecker::BoundaryChecker(const Mesh& m, Args&&... rem)
43 : BoundaryChecker(std::forward<Args>(rem)...)
44{
45 m_meshes.emplace_back(&m);
46}
47} // namespace wmtk::multimesh
The Tuple is the basic navigation tool in our mesh data structure.
Definition Tuple.hpp:19
BoundaryChecker & operator=(const BoundaryChecker &)=default
static BoundaryChecker for_all_meshes(const Mesh &m)
BoundaryChecker(const BoundaryChecker &)=default
BoundaryChecker(BoundaryChecker &&)=default
BoundaryChecker & operator=(BoundaryChecker &&)=default
bool is_boundary(const Mesh &m, const wmtk::simplex::Simplex &simplex) const
std::vector< const Mesh * > m_meshes