10 : m_attibute_handle(handle)
14 assert(handle.
held_type() == HeldType::Double);
21 const std::vector<simplex::Simplex> one_ring =
25 [&](
const auto& handle) {
26 using T =
typename std::decay_t<
decltype(handle)>::Type;
28 constexpr static HeldType ht =
29 attribute::MeshAttributeHandle::held_type_from_primitive<T>();
31 auto run = [&](
auto& accessor) {
32 auto p_mid = accessor.vector_attribute(simplex.
tuple());
35 p_mid = p_mid + accessor.vector_attribute(s.tuple());
37 p_mid = p_mid / one_ring.size();
40 if constexpr (ht == HeldType::Double) {
attribute::Accessor< T, Mesh, attribute::CachingAttribute< T >, 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)