Wildmeshing Toolkit
CollapseEnergyBeforeInvariant.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
wmtk/attribute/TypedAttributeHandle.hpp
>
4
#include "
Invariant.hpp
"
5
6
namespace
wmtk::invariants
{
7
class
CollapseEnergyBeforeInvariant
:
public
Invariant
8
{
9
public
:
10
CollapseEnergyBeforeInvariant
(
11
const
Mesh
& m,
12
const
attribute::TypedAttributeHandle<Rational>
& coordinate,
13
const
attribute::TypedAttributeHandle<double>
& energy,
14
int64_t collapse_type = 0);
15
using
Invariant::Invariant
;
16
17
bool
before
(
const
simplex::Simplex
& s)
const override
;
18
19
private
:
20
const
attribute::TypedAttributeHandle<Rational>
m_coordinate_handle
;
21
const
attribute::TypedAttributeHandle<double>
m_energy_handle
;
22
const
int64_t
m_collapse_type
;
// 0: collapse to v0, 1: collapse to v1, 2: collapse to midpoint
23
};
24
}
// namespace wmtk::invariants
Invariant.hpp
TypedAttributeHandle.hpp
wmtk::Mesh
Definition:
Mesh.hpp:106
wmtk::attribute::TypedAttributeHandle
Handle that represents attributes for some mesh.
Definition:
TypedAttributeHandle.hpp:28
wmtk::invariants::CollapseEnergyBeforeInvariant
Definition:
CollapseEnergyBeforeInvariant.hpp:8
wmtk::invariants::CollapseEnergyBeforeInvariant::m_collapse_type
const int64_t m_collapse_type
Definition:
CollapseEnergyBeforeInvariant.hpp:22
wmtk::invariants::CollapseEnergyBeforeInvariant::CollapseEnergyBeforeInvariant
CollapseEnergyBeforeInvariant(const Mesh &m, const attribute::TypedAttributeHandle< Rational > &coordinate, const attribute::TypedAttributeHandle< double > &energy, int64_t collapse_type=0)
Definition:
CollapseEnergyBeforeInvariant.cpp:13
wmtk::invariants::CollapseEnergyBeforeInvariant::m_coordinate_handle
const attribute::TypedAttributeHandle< Rational > m_coordinate_handle
Definition:
CollapseEnergyBeforeInvariant.hpp:20
wmtk::invariants::CollapseEnergyBeforeInvariant::m_energy_handle
const attribute::TypedAttributeHandle< double > m_energy_handle
Definition:
CollapseEnergyBeforeInvariant.hpp:21
wmtk::invariants::CollapseEnergyBeforeInvariant::before
bool before(const simplex::Simplex &s) const override
Definition:
CollapseEnergyBeforeInvariant.cpp:24
wmtk::invariants::Invariant
Definition:
Invariant.hpp:12
wmtk::invariants::Invariant::Invariant
Invariant(const Mesh &m)
Definition:
Invariant.cpp:10
wmtk::simplex::Simplex
Definition:
Simplex.hpp:22
wmtk::invariants
Definition:
CollapseEnergyBeforeInvariant.cpp:11
src
wmtk
invariants
CollapseEnergyBeforeInvariant.hpp
Generated by
1.9.1