Wildmeshing Toolkit
Loading...
Searching...
No Matches
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 &
 
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, Dim >
BaseTypebase_type ()
 
const BaseTypebase_type () const
 
 CachingAccessor (Mesh &m, const TypedAttributeHandle< T > &handle)
 
 CachingAccessor (const Mesh &m, const TypedAttributeHandle< T > &handle)
 
 ~CachingAccessor ()
 
 CachingAccessor (const CachingAccessor &)=delete
 
CachingAccessoroperator= (const CachingAccessor &)=delete
 
 CachingAccessor (CachingAccessor &&)=default
 
CachingAccessoroperator= (CachingAccessor &&)=default
 
int64_t stack_depth () const
 
bool has_stack () const
 
template<int D = Dim>
ConstMapResult< D > const_vector_attribute (const int64_t index) const
 
T const_scalar_attribute (const int64_t index) const
 
T const_scalar_attribute (const int64_t index, const int8_t offset) const
 
template<int D = Dim>
MapResult< D > vector_attribute (const int64_t index)
 
Tscalar_attribute (const int64_t index)
 
Tscalar_attribute (const int64_t index, const int8_t offset)
 
ConstMapResult vector_attribute (const int64_t index) const
 
T scalar_attribute (const int64_t index) const
 
bool writing_enabled () const
 
template<int D>
auto vector_attribute (const int64_t index) -> MapResult< D >
 
template<int D>
auto const_vector_attribute (const int64_t index) const -> ConstMapResult< D >
 
- 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, Dim >
using Scalar = T
 
using BaseType = AccessorBase< T, Dim >
 
template<int D = Dim>
using ConstMapResult = typename BaseType::template ConstMapResult< D >
 
template<int D = Dim>
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 27 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 37 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 38 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 45 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 42 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 35 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

◆ 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 ( ) const
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 93 of file Accessor.hpp.

Referenced by wmtk::attribute::Accessor< T, MeshType, Dim >::index_access(), and 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 94 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

Definition at line 124 of file Accessor.hxx.

References wmtk::Edge, wmtk::Tuple::global_cid(), wmtk::Tuple::local_eid(), wmtk::Tuple::local_fid(), wmtk::Tuple::local_vid(), wmtk::Tetrahedron, wmtk::Triangle, and wmtk::Vertex.

Here is the call graph for this function:

◆ 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 85 of file Accessor.hxx.

◆ has_stack()

template<typename T , typename MeshType = Mesh, int Dim = Eigen::Dynamic>
bool wmtk::attribute::CachingAccessor< T, Dim >::has_stack ( ) const
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 77 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 98 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 84 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 85 of file Accessor.hpp.

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

Here is the call 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 101 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 ( ) const
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 116 of file Accessor.hxx.

◆ vector_attribute() [1/2]

◆ 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 93 of file Accessor.hxx.

Friends And Related Symbol Documentation

◆ wmtk::EdgeMesh

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

Definition at line 33 of file Accessor.hpp.

◆ wmtk::Mesh

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

Definition at line 30 of file Accessor.hpp.

◆ wmtk::PointMesh

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

Definition at line 34 of file Accessor.hpp.

◆ wmtk::TetMesh

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

Definition at line 31 of file Accessor.hpp.

◆ wmtk::TriMesh

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

Definition at line 32 of file Accessor.hpp.


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