Wildmeshing Toolkit
SeparateSubstructuresInvariant.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Invariant.hpp
"
4
5
namespace
wmtk::invariants
{
6
7
/*
8
* This invariant keeps substructures in a multimesh separated during collapses.
9
*
10
* It should be attached to collapse operations alongside the link condition.
11
*
12
* There are two different options. The default is that all substructures are kept separate. For
13
* example, a child A and a child B must remain separate, if they were separate to begin with.
14
* However, the invariant can also be restricted to only disallow topological changes in single
15
* substructures.
16
*
17
* The invariant checks two conditions, where the second one can be deactivated if different
18
* substructures are allowed to be collapsed into each other. Assume we collapse an edge E and its
19
* incident vertices V0 and V1. We denote all substructures a simplex S belongs to by subs(S).
20
*
21
* Condition 1: The intersection of subs(V0) and subs(V1) is a subset of subs(E).
22
* Condition 2 (optional): subs(V0) is a subset of subs(V1) or subs(V1) is a subset of subs(V0).
23
*
24
*/
25
class
SeparateSubstructuresInvariant
:
public
Invariant
26
{
27
public
:
28
SeparateSubstructuresInvariant
(
const
Mesh
& m,
bool
check_condition_2 =
true
);
29
30
bool
before
(
const
simplex::Simplex
& s)
const override
;
31
32
private
:
33
const
bool
m_check_condition_2
=
true
;
34
};
35
36
}
// namespace wmtk::invariants
Invariant.hpp
wmtk::Mesh
Definition:
Mesh.hpp:107
wmtk::invariants::Invariant
Definition:
Invariant.hpp:12
wmtk::invariants::SeparateSubstructuresInvariant
Definition:
SeparateSubstructuresInvariant.hpp:26
wmtk::invariants::SeparateSubstructuresInvariant::SeparateSubstructuresInvariant
SeparateSubstructuresInvariant(const Mesh &m, bool check_condition_2=true)
Definition:
SeparateSubstructuresInvariant.cpp:9
wmtk::invariants::SeparateSubstructuresInvariant::before
bool before(const simplex::Simplex &s) const override
Definition:
SeparateSubstructuresInvariant.cpp:16
wmtk::invariants::SeparateSubstructuresInvariant::m_check_condition_2
const bool m_check_condition_2
Definition:
SeparateSubstructuresInvariant.hpp:33
wmtk::simplex::Simplex
Definition:
Simplex.hpp:22
wmtk::invariants
Definition:
CollapseEnergyBeforeInvariant.cpp:11
src
wmtk
invariants
SeparateSubstructuresInvariant.hpp
Generated by
1.9.1