10 : m_attibute_handle(handle)
22 const std::vector<simplex::Simplex> one_ring =
26 [&](
const auto& handle) {
27 using T =
typename std::decay_t<decltype(handle)>::value_type;
29 constexpr
static HeldType ht =
30 attribute::MeshAttributeHandle::held_type_from_primitive<T>();
32 auto run = [&](
auto& accessor) {
33 auto p_mid = accessor.vector_attribute(simplex.
tuple());
36 p_mid = p_mid + accessor.vector_attribute(s.tuple());
38 p_mid = p_mid / one_ring.size();
41 if constexpr (ht == HeldType::Double) {
attribute::Accessor< T, Mesh, D > create_accessor(const attribute::MeshAttributeHandle &handle)
HeldType held_type() const
virtual bool operator()(Mesh &m, const simplex::Simplex &s)
attribute::MeshAttributeHandle m_attibute_handle
VertexLaplacianSmooth(const attribute::MeshAttributeHandle &handle)
const std::vector< Simplex > & simplex_vector() const
Return const reference to the simplex vector.
const Tuple & tuple() const
SimplexCollection link(const Mesh &mesh, const simplex::Simplex &simplex, const bool sort_and_clean)