Wildmeshing Toolkit
Loading...
Searching...
No Matches
CollapseSoftEnergyBeforeInvariant.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
CollapseSoftEnergyBeforeInvariant
:
public
Invariant
8
{
9
public
:
10
CollapseSoftEnergyBeforeInvariant
(
11
const
Mesh
& m,
12
const
attribute::TypedAttributeHandle<Rational>
& coordinate,
13
const
attribute::TypedAttributeHandle<double>
& energy,
14
const
attribute::TypedAttributeHandle<double>
& edge_length,
15
const
attribute::TypedAttributeHandle<double>
& target_edge_length,
16
int64_t collapse_type = 0,
17
double
eps = 0.1);
18
using
Invariant::Invariant
;
19
20
bool
before
(
const
simplex::Simplex
& s)
const override
;
21
22
private
:
23
const
attribute::TypedAttributeHandle<Rational>
m_coordinate_handle
;
24
const
attribute::TypedAttributeHandle<double>
m_energy_handle
;
25
const
attribute::TypedAttributeHandle<double>
m_edge_length_handle
;
26
const
attribute::TypedAttributeHandle<double>
m_target_edge_length_handle
;
27
const
int64_t
m_collapse_type
;
// 0: collapse to v0, 1: collapse to v1, 2: collapse to midpoint
28
const
double
m_eps
;
29
};
30
}
// namespace wmtk::invariants
Invariant.hpp
TypedAttributeHandle.hpp
wmtk::Mesh
Definition
Mesh.hpp:95
wmtk::attribute::TypedAttributeHandle
Handle that represents attributes for some mesh.
Definition
TypedAttributeHandle.hpp:28
wmtk::invariants::CollapseSoftEnergyBeforeInvariant
Definition
CollapseSoftEnergyBeforeInvariant.hpp:8
wmtk::invariants::CollapseSoftEnergyBeforeInvariant::m_coordinate_handle
const attribute::TypedAttributeHandle< Rational > m_coordinate_handle
Definition
CollapseSoftEnergyBeforeInvariant.hpp:23
wmtk::invariants::CollapseSoftEnergyBeforeInvariant::m_target_edge_length_handle
const attribute::TypedAttributeHandle< double > m_target_edge_length_handle
Definition
CollapseSoftEnergyBeforeInvariant.hpp:26
wmtk::invariants::CollapseSoftEnergyBeforeInvariant::m_collapse_type
const int64_t m_collapse_type
Definition
CollapseSoftEnergyBeforeInvariant.hpp:27
wmtk::invariants::CollapseSoftEnergyBeforeInvariant::m_energy_handle
const attribute::TypedAttributeHandle< double > m_energy_handle
Definition
CollapseSoftEnergyBeforeInvariant.hpp:24
wmtk::invariants::CollapseSoftEnergyBeforeInvariant::before
bool before(const simplex::Simplex &s) const override
Definition
CollapseSoftEnergyBeforeInvariant.cpp:29
wmtk::invariants::CollapseSoftEnergyBeforeInvariant::m_eps
const double m_eps
Definition
CollapseSoftEnergyBeforeInvariant.hpp:28
wmtk::invariants::CollapseSoftEnergyBeforeInvariant::m_edge_length_handle
const attribute::TypedAttributeHandle< double > m_edge_length_handle
Definition
CollapseSoftEnergyBeforeInvariant.hpp:25
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
CollapseSoftEnergyBeforeInvariant.hpp
Generated by
1.9.8