Wildmeshing Toolkit
wmtk::attribute::Accessor< T, MeshType, Dim > Class Template Reference

A CachingAccessor that uses tuples for accessing attributes instead of indices. More...

#include <Accessor.hpp>

Inheritance diagram for wmtk::attribute::Accessor< T, MeshType, Dim >:
[legend]
Collaboration diagram for wmtk::attribute::Accessor< T, MeshType, Dim >:
[legend]

Public Types

using Scalar = T
 
using BaseType = AccessorBase< T, Dim >
 
using CachingBaseType = CachingAccessor< T, Dim >
 
template<int D = Dim>
using MapResult = internal::MapResult< T, D >
 
template<int D = Dim>
using ConstMapResult = internal::ConstMapResult< T, D >
 

Public Member Functions

 Accessor (MeshType &m, const TypedAttributeHandle< T > &handle)
 
 Accessor (const MeshType &m, const TypedAttributeHandle< T > &handle)
 
template<typename OMType , int D>
 Accessor (const Accessor< T, OMType, D > &o)
 
T const_topological_scalar_attribute (const Tuple &t, PrimitiveType pt) const
 
template<typename ArgType >
Ttopological_scalar_attribute (const ArgType &t)
 
template<typename ArgType >
T const_scalar_attribute (const ArgType &t) const
 
template<typename ArgType >
Tscalar_attribute (const ArgType &t)
 
template<int D = Dim, typename ArgType = wmtk::Tuple>
ConstMapResult< D > const_vector_attribute (const ArgType &t) const
 
template<int D = Dim, typename ArgType = wmtk::Tuple>
MapResult< D > vector_attribute (const ArgType &t)
 
MeshType & mesh ()
 
const MeshType & mesh () const
 
CachingBaseTypeindex_access ()
 
const CachingBaseTypeindex_access () const
 
template<int D, typename ArgType >
auto const_vector_attribute (const ArgType &t) const -> ConstMapResult< D >
 
template<int D, typename ArgType >
auto vector_attribute (const ArgType &t) -> MapResult< D >
 
template<typename ArgType >
auto scalar_attribute (const ArgType &t) -> T &
 
template<typename ArgType >
auto topological_scalar_attribute (const ArgType &t) -> T &
 
int64_t dimension () const
 
int64_t reserved_size () const
 
Attribute< T > & attribute ()
 
const Attribute< T > & attribute () const
 
MeshAttributeHandle handle () const
 
PrimitiveType primitive_type () const
 
const TypedAttributeHandle< T > & typed_handle () const
 
bool has_stack () const
 
int64_t stack_depth () const
 

Protected Member Functions

int64_t index (const Tuple &t) const
 
int64_t index (const simplex::Simplex &t) const
 
int64_t index (const simplex::IdSimplex &t) const
 
CachingBaseTypecaching_base_type ()
 
const CachingBaseTypecaching_base_type () const
 
BaseTypebase_type ()
 
const BaseTypebase_type () const
 
- Protected Member Functions inherited from wmtk::attribute::CachingAccessor< T, Eigen::Dynamic >
BaseTypebase_type ()
 
const BaseTypebase_type () const
 
 CachingAccessor (Mesh &m, const TypedAttributeHandle< T > &handle)
 
 CachingAccessor (const Mesh &m, const TypedAttributeHandle< T > &handle)
 
 CachingAccessor (const CachingAccessor &)=delete
 
 CachingAccessor (CachingAccessor &&)=default
 
 ~CachingAccessor ()
 
CachingAccessoroperator= (const CachingAccessor &)=delete
 
CachingAccessoroperator= (CachingAccessor &&)=default
 
int64_t stack_depth () const
 
bool has_stack () const
 
ConstMapResult< D > const_vector_attribute (const int64_t index) const
 
auto const_vector_attribute (const int64_t index) const -> ConstMapResult< D >
 
T const_scalar_attribute (const int64_t index) const
 
T const_scalar_attribute (const int64_t index, const int8_t offset) const
 
MapResult< D > vector_attribute (const int64_t index)
 
ConstMapResult vector_attribute (const int64_t index) const
 
auto vector_attribute (const int64_t index) -> MapResult< D >
 
Tscalar_attribute (const int64_t index)
 
Tscalar_attribute (const int64_t index, const int8_t offset)
 
T scalar_attribute (const int64_t index) const
 
bool writing_enabled () const
 
Attribute< T > & attribute ()
 
const Attribute< T > & attribute () const
 
Meshmesh ()
 
const Meshmesh () const
 
- Protected Member Functions inherited from wmtk::attribute::AccessorBase< _T, Dim >
const AttributeManagerattribute_manager () const
 
AttributeManagerattribute_manager ()
 
int64_t reserved_size () const
 
int64_t dimension () const
 
const Tdefault_value () const
 
void set_attribute (std::vector< T > value)
 
template<int D = Dim>
ConstMapResult< D > const_vector_attribute (const int64_t index) const
 
template<int D = Dim>
MapResult< D > vector_attribute (const int64_t index)
 
T const_scalar_attribute (const int64_t index) const
 
Tscalar_attribute (const int64_t index)
 
T const_scalar_attribute (const int64_t index, const int8_t offset) const
 
Tscalar_attribute (const int64_t index, const int8_t offset)
 
MeshAttributes< T > & attributes ()
 
const MeshAttributes< T > & attributes () const
 
Attribute< T > & attribute ()
 
const Attribute< T > & attribute () const
 
 ~AccessorBase ()
 
 AccessorBase (Mesh &m, const TypedAttributeHandle< T > &handle)
 
 AccessorBase (const Mesh &m, const TypedAttributeHandle< T > &handle)
 
MeshAttributeHandle handle () const
 
const TypedAttributeHandle< T > & typed_handle () const
 
PrimitiveType primitive_type () const
 
Meshmesh ()
 
const Meshmesh () const
 
template<int D>
auto const_vector_attribute (const int64_t index) const -> ConstMapResult< D >
 
template<int D>
auto vector_attribute (const int64_t index) -> MapResult< D >
 

Friends

class wmtk::Mesh
 
class wmtk::TetMesh
 
class wmtk::TriMesh
 
class wmtk::EdgeMesh
 
class wmtk::PointMesh
 

Additional Inherited Members

- Protected Types inherited from wmtk::attribute::CachingAccessor< T, Eigen::Dynamic >
using Scalar = T
 
using BaseType = AccessorBase< T, Dim >
 
using ConstMapResult = typename BaseType::template ConstMapResult< D >
 
using MapResult = typename BaseType::template MapResult< D >
 
- Protected Types inherited from wmtk::attribute::AccessorBase< _T, Dim >
using T = _T
 
using MeshAttributesType = MeshAttributes< T >
 
using AttributeType = Attribute< T >
 
template<int D = Dim>
using MapResult = internal::MapResult< T, D >
 
template<int D = Dim>
using ConstMapResult = internal::ConstMapResult< T, D >
 
- Protected Attributes inherited from wmtk::attribute::AccessorBase< _T, Dim >
TypedAttributeHandle< Tm_handle
 
Meshm_mesh
 
Attribute< T > & m_attribute
 

Detailed Description

template<typename T, typename MeshType = Mesh, int Dim = Eigen::Dynamic>
class wmtk::attribute::Accessor< T, MeshType, Dim >

A CachingAccessor that uses tuples for accessing attributes instead of indices.

As global simplex ids should not be publicly available, this accessor uses the Mesh.id() function to map from a tuple to the global simplex id.

Definition at line 24 of file Accessor.hpp.

Member Typedef Documentation

◆ BaseType

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
using wmtk::attribute::Accessor< T, MeshType, Dim >::BaseType = AccessorBase<T, Dim>

Definition at line 34 of file Accessor.hpp.

◆ CachingBaseType

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
using wmtk::attribute::Accessor< T, MeshType, Dim >::CachingBaseType = CachingAccessor<T, Dim>

Definition at line 35 of file Accessor.hpp.

◆ ConstMapResult

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
template<int D = Dim>
using wmtk::attribute::Accessor< T, MeshType, Dim >::ConstMapResult = internal::ConstMapResult<T, D>

Definition at line 42 of file Accessor.hpp.

◆ MapResult

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
template<int D = Dim>
using wmtk::attribute::Accessor< T, MeshType, Dim >::MapResult = internal::MapResult<T, D>

Definition at line 39 of file Accessor.hpp.

◆ Scalar

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
using wmtk::attribute::Accessor< T, MeshType, Dim >::Scalar = T

Definition at line 32 of file Accessor.hpp.

Constructor & Destructor Documentation

◆ Accessor() [1/3]

template<typename T , typename MeshType , int Dim>
wmtk::attribute::Accessor< T, MeshType, Dim >::Accessor ( MeshType &  m,
const TypedAttributeHandle< T > &  handle 
)

Definition at line 8 of file Accessor.hxx.

◆ Accessor() [2/3]

template<typename T , typename MeshType , int Dim>
wmtk::attribute::Accessor< T, MeshType, Dim >::Accessor ( const MeshType &  m,
const TypedAttributeHandle< T > &  handle 
)

Definition at line 12 of file Accessor.hxx.

◆ Accessor() [3/3]

template<typename T , typename MeshType , int Dim>
template<typename OMType , int D>
wmtk::attribute::Accessor< T, MeshType, Dim >::Accessor ( const Accessor< T, OMType, D > &  o)

Definition at line 17 of file Accessor.hxx.

Member Function Documentation

◆ attribute() [1/2]

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
auto wmtk::attribute::AccessorBase< T, Dim >::attribute
inline

Definition at line 66 of file AccessorBase.hxx.

Referenced by wmtk::Mesh::consolidate().

Here is the caller graph for this function:

◆ attribute() [2/2]

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
auto wmtk::attribute::AccessorBase< T, Dim >::attribute
inline

Definition at line 67 of file AccessorBase.hxx.

◆ base_type() [1/2]

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
BaseType& wmtk::attribute::CachingAccessor< T, Dim >::base_type
inlineprotected

Definition at line 81 of file CachingAccessor.hpp.

◆ base_type() [2/2]

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
const BaseType& wmtk::attribute::CachingAccessor< T, Dim >::base_type
inlineprotected

Definition at line 82 of file CachingAccessor.hpp.

◆ caching_base_type() [1/2]

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
CachingBaseType& wmtk::attribute::Accessor< T, MeshType, Dim >::caching_base_type ( )
inlineprotected

Definition at line 91 of file Accessor.hpp.

Referenced by wmtk::attribute::Accessor< T, MeshType, Dim >::index_access().

Here is the caller graph for this function:

◆ caching_base_type() [2/2]

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
const CachingBaseType& wmtk::attribute::Accessor< T, MeshType, Dim >::caching_base_type ( ) const
inlineprotected

Definition at line 92 of file Accessor.hpp.

◆ const_scalar_attribute()

template<typename T , typename MeshType , int Dim>
template<typename ArgType >
T wmtk::attribute::Accessor< T, MeshType, Dim >::const_scalar_attribute ( const ArgType &  t) const

◆ const_topological_scalar_attribute()

template<typename T , typename MeshType , int Dim>
T wmtk::attribute::Accessor< T, MeshType, Dim >::const_topological_scalar_attribute ( const Tuple t,
PrimitiveType  pt 
) const

◆ const_vector_attribute() [1/2]

◆ const_vector_attribute() [2/2]

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
template<int D, typename ArgType >
auto wmtk::attribute::Accessor< T, MeshType, Dim >::const_vector_attribute ( const ArgType &  t) const -> ConstMapResult<D>

Definition at line 87 of file Accessor.hxx.

◆ dimension()

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
int64_t wmtk::attribute::AccessorBase< T, Dim >::dimension
inline

Definition at line 46 of file AccessorBase.hxx.

Referenced by wmtk::invariants::EnvelopeInvariant::after(), wmtk::invariants::EnvelopeInvariant::EnvelopeInvariant(), wmtk::multimesh::utils::read_tuple_map_attribute(), and wmtk::multimesh::utils::write_tuple_map_attribute().

Here is the caller graph for this function:

◆ handle()

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
MeshAttributeHandle wmtk::attribute::AccessorBase< T, Dim >::handle
inline

Definition at line 74 of file AccessorBase.hxx.

◆ has_stack()

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
bool wmtk::attribute::CachingAccessor< T, Dim >::has_stack
inline

Definition at line 56 of file CachingAccessor.hxx.

◆ index() [1/3]

template<typename T , typename MeshType , int Dim>
int64_t wmtk::attribute::Accessor< T, MeshType, Dim >::index ( const simplex::IdSimplex t) const
protected

Definition at line 78 of file Accessor.hxx.

References wmtk::simplex::IdSimplex::primitive_type().

Here is the call graph for this function:

◆ index() [2/3]

template<typename T , typename MeshType , int Dim>
int64_t wmtk::attribute::Accessor< T, MeshType, Dim >::index ( const simplex::Simplex t) const
protected

Definition at line 70 of file Accessor.hxx.

References wmtk::simplex::Simplex::primitive_type(), and wmtk::simplex::Simplex::tuple().

Here is the call graph for this function:

◆ index() [3/3]

template<typename T , typename MeshType , int Dim>
int64_t wmtk::attribute::Accessor< T, MeshType, Dim >::index ( const Tuple t) const
protected

Definition at line 63 of file Accessor.hxx.

◆ index_access() [1/2]

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
CachingBaseType& wmtk::attribute::Accessor< T, MeshType, Dim >::index_access ( )
inline

◆ index_access() [2/2]

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
const CachingBaseType& wmtk::attribute::Accessor< T, MeshType, Dim >::index_access ( ) const
inline

Definition at line 96 of file Accessor.hpp.

References wmtk::attribute::Accessor< T, MeshType, Dim >::caching_base_type().

Here is the call graph for this function:

◆ mesh() [1/2]

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
MeshType& wmtk::attribute::Accessor< T, MeshType, Dim >::mesh ( )
inline

Definition at line 81 of file Accessor.hpp.

References wmtk::attribute::AccessorBase< _T, Dim >::mesh().

Referenced by wmtk::operations::composite::ProjectOperation::execute(), and wmtk::operations::composite::ProjectOperation::ProjectOperation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mesh() [2/2]

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
const MeshType& wmtk::attribute::Accessor< T, MeshType, Dim >::mesh ( ) const
inline

Definition at line 82 of file Accessor.hpp.

References wmtk::attribute::AccessorBase< _T, Dim >::mesh().

Here is the call graph for this function:

◆ primitive_type()

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
PrimitiveType wmtk::attribute::AccessorBase< T, Dim >::primitive_type
inline

Definition at line 76 of file AccessorBase.hxx.

Referenced by wmtk::operations::CollapseNewAttributeStrategy< T >::assign_collapsed(), wmtk::operations::SplitNewAttributeStrategy< T >::assign_split(), and wmtk::operations::SplitNewAttributeStrategy< T >::assign_split_ribs().

Here is the caller graph for this function:

◆ reserved_size()

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
int64_t wmtk::attribute::AccessorBase< T, Dim >::reserved_size
inline

Definition at line 45 of file AccessorBase.hxx.

Referenced by wmtk::Mesh::request_simplex_indices(), and wmtk::Mesh::set_capacities_from_flags().

Here is the caller graph for this function:

◆ scalar_attribute() [1/2]

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
template<typename ArgType >
T& wmtk::attribute::Accessor< T, MeshType, Dim >::scalar_attribute ( const ArgType &  t)

◆ scalar_attribute() [2/2]

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
template<typename ArgType >
auto wmtk::attribute::Accessor< T, MeshType, Dim >::scalar_attribute ( const ArgType &  t) -> T&

Definition at line 104 of file Accessor.hxx.

◆ stack_depth()

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
int64_t wmtk::attribute::CachingAccessor< T, Dim >::stack_depth
inline

Definition at line 54 of file CachingAccessor.hxx.

◆ topological_scalar_attribute() [1/2]

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
template<typename ArgType >
T& wmtk::attribute::Accessor< T, MeshType, Dim >::topological_scalar_attribute ( const ArgType &  t)

◆ topological_scalar_attribute() [2/2]

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
template<typename ArgType >
auto wmtk::attribute::Accessor< T, MeshType, Dim >::topological_scalar_attribute ( const ArgType &  t) -> T&

Definition at line 119 of file Accessor.hxx.

◆ typed_handle()

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
const TypedAttributeHandle< T > & wmtk::attribute::AccessorBase< T, Dim >::typed_handle
inline

Definition at line 75 of file AccessorBase.hxx.

◆ vector_attribute() [1/2]

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
template<int D = Dim, typename ArgType = wmtk::Tuple>
MapResult<D> wmtk::attribute::Accessor< T, MeshType, Dim >::vector_attribute ( const ArgType &  t)

◆ vector_attribute() [2/2]

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
template<int D, typename ArgType >
auto wmtk::attribute::Accessor< T, MeshType, Dim >::vector_attribute ( const ArgType &  t) -> MapResult<D>

Definition at line 96 of file Accessor.hxx.

Friends And Related Function Documentation

◆ wmtk::EdgeMesh

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
friend class wmtk::EdgeMesh
friend

Definition at line 30 of file Accessor.hpp.

◆ wmtk::Mesh

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
friend class wmtk::Mesh
friend

Definition at line 27 of file Accessor.hpp.

◆ wmtk::PointMesh

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
friend class wmtk::PointMesh
friend

Definition at line 31 of file Accessor.hpp.

◆ wmtk::TetMesh

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
friend class wmtk::TetMesh
friend

Definition at line 28 of file Accessor.hpp.

◆ wmtk::TriMesh

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
friend class wmtk::TriMesh
friend

Definition at line 29 of file Accessor.hpp.


The documentation for this class was generated from the following files: