7template <
typename T,
typename MeshType,
int Dim>
11template <
typename T,
typename MeshType,
int Dim>
15template <
typename T,
typename MeshType,
int Dim>
16template <
typename OMType,
int D>
18 :
Accessor(static_cast<const MeshType&>(o.mesh()), o.handle())
20 static_assert(Dim == Eigen::Dynamic || D == Eigen::Dynamic || Dim == D);
62template <
typename T,
typename MeshType,
int Dim>
65 assert(mesh().is_valid(t));
66 return this->mesh().id(t, BaseType::typed_handle().primitive_type());
69template <
typename T,
typename MeshType,
int Dim>
73 return this->index(t.
tuple());
76template <
typename T,
typename MeshType,
int Dim>
80 return this->mesh().id(t);
83template <
typename T,
typename MeshType,
int Dim>
84template <
int D,
typename ArgType>
87 const int64_t idx = this->index(t);
88 return CachingBaseType::template const_vector_attribute<D>(idx);
91template <
typename T,
typename MeshType,
int Dim>
92template <
int D,
typename ArgType>
95 const int64_t idx = this->index(t);
96 return CachingBaseType::template vector_attribute<D>(idx);
99template <
typename T,
typename MeshType,
int Dim>
100template <
typename ArgType>
103 const int64_t idx = this->index(t);
104 return CachingBaseType::scalar_attribute(idx);
107template <
typename T,
typename MeshType,
int Dim>
108template <
typename ArgType>
111 const int64_t idx = this->index(t);
112 return CachingBaseType::const_scalar_attribute(idx);
114template <
typename T,
typename MeshType,
int Dim>
115template <
typename ArgType>
118 const int64_t idx = this->index(t);
119 return CachingBaseType::scalar_attribute(idx);
123template <
typename T,
typename MeshType,
int Dim>
127 assert(mesh().top_simplex_type() == BaseType::primitive_type());
136 default:
return T(0);
The Tuple is the basic navigation tool in our mesh data structure.
int64_t global_cid() const
A CachingAccessor that uses tuples for accessing attributes instead of indices.
T & scalar_attribute(const ArgType &t)
int64_t index(const Tuple &t) const
T const_scalar_attribute(const ArgType &t) const
T const_topological_scalar_attribute(const Tuple &t, PrimitiveType pt) const
internal::MapResult< T, D > MapResult
T & topological_scalar_attribute(const ArgType &t)
internal::ConstMapResult< T, D > ConstMapResult
MapResult< D > vector_attribute(const ArgType &t)
ConstMapResult< D > const_vector_attribute(const ArgType &t) const
An accessor for cached attribute values.
Handle that represents attributes for some mesh.
PrimitiveType primitive_type() const
const Tuple & tuple() const
PrimitiveType primitive_type() const