Wildmeshing Toolkit
Loading...
Searching...
No Matches
NoChildMeshAttachingInvariant.cpp
Go to the documentation of this file.
2#include <wmtk/Mesh.hpp>
4
5namespace wmtk::invariants {
9
11{
13
14 auto child_meshes = mesh().get_child_meshes();
15
16 for (auto child_mesh : child_meshes) {
17 // if (!mesh().map_to_child(*child_mesh, simplex::Simplex::edge(mesh(), t.tuple())).empty())
18 // {
19 // continue;
20 // }
21 if (!mesh()
22 .map_to_child(*child_mesh, simplex::Simplex::vertex(mesh(), t.tuple()))
23 .empty() ||
24 !mesh()
26 *child_mesh,
28 mesh(),
29 mesh().switch_tuple(t.tuple(), PrimitiveType::Vertex)))
30 .empty()) {
31 return false;
32 }
33 }
34
35 return true;
36}
37} // namespace wmtk::invariants
std::vector< simplex::Simplex > map_to_child(const Mesh &child_mesh, const simplex::Simplex &my_simplex) const
optimized map fromsimplex from this mesh to one of its direct children
std::vector< std::shared_ptr< Mesh > > get_child_meshes() const
returns the direct multimesh child meshes for the current mesh
const Mesh & mesh() const
Definition Invariant.cpp:35
bool before(const simplex::Simplex &t) const override
static Simplex vertex(const Mesh &m, const Tuple &t)
Definition Simplex.hpp:56
const Tuple & tuple() const
Definition Simplex.hpp:53
PrimitiveType primitive_type() const
Definition Simplex.hpp:51