Wildmeshing Toolkit
Loading...
Searching...
No Matches
UseParentScopeRAII.cpp
Go to the documentation of this file.
1// clang-format off
2#include <wmtk/Mesh.hpp>
3#include <wmtk/PointMesh.hpp>
4#include <wmtk/EdgeMesh.hpp>
5#include <wmtk/TriMesh.hpp>
6#include <wmtk/TetMesh.hpp>
7// clang-format on
9
11
13 : m_mesh(mesh)
14{
15 auto run = [](auto&& m) {
16 if constexpr (!std::is_const_v<std::decay_t<decltype(m)>>) {
17 m.m_attribute_manager.change_to_parent_scope();
18 }
19 };
20 MultiMeshVisitor visitor(run);
22}
24{
25 auto run = [](auto&& m) {
26 if constexpr (!std::is_const_v<std::decay_t<decltype(m)>>) {
27 m.m_attribute_manager.change_to_child_scope();
28 }
29 };
30 MultiMeshVisitor visitor(run);
32}
33} // namespace wmtk::multimesh::attribute