Wildmeshing Toolkit
EdgeValenceInvariant.cpp
Go to the documentation of this file.
1
#include "
EdgeValenceInvariant.hpp
"
2
3
#include <
wmtk/simplex/top_dimension_cofaces.hpp
>
4
5
namespace
wmtk::invariants
{
6
EdgeValenceInvariant::EdgeValenceInvariant
(
const
Mesh
& m, int64_t valence)
7
:
Invariant
(m,true,false,false)
8
, m_valence(valence)
9
{}
10
11
bool
EdgeValenceInvariant::before
(
const
simplex::Simplex
& simplex)
const
12
{
13
const
Tuple
& t = simplex.
tuple
();
14
15
assert(simplex.
primitive_type
() ==
PrimitiveType::Edge
);
16
17
return
simplex::top_dimension_cofaces_tuples
(
mesh
(), simplex).size() ==
m_valence
;
18
}
19
}
// namespace wmtk::invariants
EdgeValenceInvariant.hpp
wmtk::Mesh
Definition:
Mesh.hpp:106
wmtk::Tuple
Definition:
Tuple.hpp:42
wmtk::invariants::EdgeValenceInvariant::before
bool before(const simplex::Simplex &t) const override
Definition:
EdgeValenceInvariant.cpp:11
wmtk::invariants::EdgeValenceInvariant::EdgeValenceInvariant
EdgeValenceInvariant(const Mesh &m, int64_t valence)
Definition:
EdgeValenceInvariant.cpp:6
wmtk::invariants::EdgeValenceInvariant::m_valence
int64_t m_valence
Definition:
EdgeValenceInvariant.hpp:20
wmtk::invariants::Invariant
Definition:
Invariant.hpp:12
wmtk::invariants::Invariant::mesh
const Mesh & mesh() const
Definition:
Invariant.cpp:35
wmtk::simplex::Simplex
Definition:
Simplex.hpp:22
wmtk::simplex::Simplex::tuple
const Tuple & tuple() const
Definition:
Simplex.hpp:53
wmtk::simplex::Simplex::primitive_type
PrimitiveType primitive_type() const
Definition:
Simplex.hpp:51
wmtk::invariants
Definition:
CollapseEnergyBeforeInvariant.cpp:11
wmtk::simplex::top_dimension_cofaces_tuples
void top_dimension_cofaces_tuples(const PointMesh &mesh, const Simplex &simplex, SimplexCollection &collection)
Definition:
top_dimension_cofaces.cpp:440
wmtk::PrimitiveType::Edge
@ Edge
top_dimension_cofaces.hpp
src
wmtk
invariants
EdgeValenceInvariant.cpp
Generated by
1.9.1