Wildmeshing Toolkit
|
A CachingAccessor that uses tuples for accessing attributes instead of indices. More...
#include <Accessor.hpp>
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 > | |
T & | topological_scalar_attribute (const ArgType &t) |
template<typename ArgType > | |
T | const_scalar_attribute (const ArgType &t) const |
template<typename ArgType > | |
T & | scalar_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 |
CachingBaseType & | index_access () |
const CachingBaseType & | index_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 |
CachingBaseType & | caching_base_type () |
const CachingBaseType & | caching_base_type () const |
BaseType & | base_type () |
const BaseType & | base_type () const |
Protected Member Functions inherited from wmtk::attribute::CachingAccessor< T, Eigen::Dynamic > | |
BaseType & | base_type () |
const BaseType & | base_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 () | |
CachingAccessor & | operator= (const CachingAccessor &)=delete |
CachingAccessor & | operator= (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 > |
T & | scalar_attribute (const int64_t index) |
T & | scalar_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 |
Mesh & | mesh () |
const Mesh & | mesh () const |
Protected Member Functions inherited from wmtk::attribute::AccessorBase< _T, Dim > | |
const AttributeManager & | attribute_manager () const |
AttributeManager & | attribute_manager () |
int64_t | reserved_size () const |
int64_t | dimension () const |
const T & | default_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 |
T & | scalar_attribute (const int64_t index) |
T | const_scalar_attribute (const int64_t index, const int8_t offset) const |
T & | scalar_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 |
Mesh & | mesh () |
const Mesh & | mesh () 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< T > | m_handle |
Mesh & | m_mesh |
Attribute< T > & | m_attribute |
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.
using wmtk::attribute::Accessor< T, MeshType, Dim >::BaseType = AccessorBase<T, Dim> |
Definition at line 34 of file Accessor.hpp.
using wmtk::attribute::Accessor< T, MeshType, Dim >::CachingBaseType = CachingAccessor<T, Dim> |
Definition at line 35 of file Accessor.hpp.
using wmtk::attribute::Accessor< T, MeshType, Dim >::ConstMapResult = internal::ConstMapResult<T, D> |
Definition at line 42 of file Accessor.hpp.
using wmtk::attribute::Accessor< T, MeshType, Dim >::MapResult = internal::MapResult<T, D> |
Definition at line 39 of file Accessor.hpp.
using wmtk::attribute::Accessor< T, MeshType, Dim >::Scalar = T |
Definition at line 32 of file Accessor.hpp.
wmtk::attribute::Accessor< T, MeshType, Dim >::Accessor | ( | MeshType & | m, |
const TypedAttributeHandle< T > & | handle | ||
) |
Definition at line 8 of file Accessor.hxx.
wmtk::attribute::Accessor< T, MeshType, Dim >::Accessor | ( | const MeshType & | m, |
const TypedAttributeHandle< T > & | handle | ||
) |
Definition at line 12 of file Accessor.hxx.
wmtk::attribute::Accessor< T, MeshType, Dim >::Accessor | ( | const Accessor< T, OMType, D > & | o | ) |
Definition at line 17 of file Accessor.hxx.
|
inline |
Definition at line 66 of file AccessorBase.hxx.
Referenced by wmtk::Mesh::consolidate().
|
inline |
Definition at line 67 of file AccessorBase.hxx.
|
inlineprotected |
Definition at line 81 of file CachingAccessor.hpp.
|
inlineprotected |
Definition at line 82 of file CachingAccessor.hpp.
|
inlineprotected |
Definition at line 91 of file Accessor.hpp.
Referenced by wmtk::attribute::Accessor< T, MeshType, Dim >::index_access().
|
inlineprotected |
Definition at line 92 of file Accessor.hpp.
T wmtk::attribute::Accessor< T, MeshType, Dim >::const_scalar_attribute | ( | const ArgType & | t | ) | const |
Definition at line 112 of file Accessor.hxx.
Referenced by wmtk::TodoInvariant::before(), wmtk::TodoLargerInvariant::before(), wmtk::TodoSmallerInvariant::before(), wmtk::components::internal::MultiMeshFromTag::compute_substructure_mesh(), wmtk::components::internal::MultiMeshFromTag::create_substructure_soup(), wmtk::multimesh::utils::internal::TupleTag::get_edge_tag(), wmtk::multimesh::utils::internal::TupleTag::get_vertex_tag(), wmtk::components::TagAttribute::is_tagged(), wmtk::components::Marching::process(), and wmtk::components::internal::RegularSpace::regularize_tags().
T wmtk::attribute::Accessor< T, MeshType, Dim >::const_topological_scalar_attribute | ( | const Tuple & | t, |
PrimitiveType | pt | ||
) | const |
Definition at line 129 of file Accessor.hxx.
References wmtk::Edge, wmtk::Tuple::m_global_cid, wmtk::Tuple::m_local_eid, wmtk::Tuple::m_local_fid, wmtk::Tuple::m_local_vid, wmtk::Tetrahedron, wmtk::Triangle, and wmtk::Vertex.
ConstMapResult<D> wmtk::attribute::Accessor< T, MeshType, Dim >::const_vector_attribute | ( | const ArgType & | t | ) | const |
Referenced by wmtk::invariants::EnvelopeInvariant::after(), wmtk::operations::CollapseNewAttributeStrategy< T >::assign_collapsed(), wmtk::operations::SplitNewAttributeStrategy< T >::assign_split(), wmtk::operations::SplitNewAttributeStrategy< T >::assign_split_ribs(), wmtk::MaxEdgeLengthInvariant::before(), wmtk::invariants::MinEdgeLengthInvariant::before(), wmtk::components::internal::MultiMeshFromTag::build_adjacency_matrix(), wmtk::mesh_utils::compute_face_normal_area_weighted(), wmtk::components::internal::MultiMeshFromTag::compute_substructure_ids(), wmtk::invariants::EnvelopeInvariant::EnvelopeInvariant(), wmtk::EdgeMesh::id(), wmtk::TetMesh::is_boundary_face(), wmtk::EdgeMesh::is_boundary_vertex(), wmtk::operations::composite::ProjectOperation::ProjectOperation(), wmtk::multimesh::utils::read_tuple_map_attribute(), wmtk::EdgeMesh::switch_tuple(), and wmtk::multimesh::utils::write_tuple_map_attribute().
auto wmtk::attribute::Accessor< T, MeshType, Dim >::const_vector_attribute | ( | const ArgType & | t | ) | const -> ConstMapResult<D> |
Definition at line 87 of file Accessor.hxx.
|
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().
|
inline |
Definition at line 74 of file AccessorBase.hxx.
|
inline |
Definition at line 56 of file CachingAccessor.hxx.
|
protected |
Definition at line 78 of file Accessor.hxx.
References wmtk::simplex::IdSimplex::primitive_type().
|
protected |
Definition at line 70 of file Accessor.hxx.
References wmtk::simplex::Simplex::primitive_type(), and wmtk::simplex::Simplex::tuple().
|
protected |
Definition at line 63 of file Accessor.hxx.
|
inline |
Definition at line 95 of file Accessor.hpp.
References wmtk::attribute::Accessor< T, MeshType, Dim >::caching_base_type().
Referenced by wmtk::attribute::IndexFlagAccessor< MeshType >::activate(), wmtk::attribute::IndexFlagAccessor< MeshType >::deactivate(), wmtk::Mesh::get_index_access(), wmtk::EdgeMesh::initialize(), wmtk::TriMesh::initialize(), wmtk::attribute::IndexFlagAccessor< MeshType >::is_active(), wmtk::TetMesh::is_connectivity_valid(), wmtk::TriMesh::is_connectivity_valid(), wmtk::EdgeMesh::is_connectivity_valid(), wmtk::EdgeMesh::switch_tuple(), wmtk::EdgeMesh::tuple_from_global_ids(), and wmtk::EdgeMesh::vertex_tuple_from_id().
|
inline |
Definition at line 96 of file Accessor.hpp.
References wmtk::attribute::Accessor< T, MeshType, Dim >::caching_base_type().
|
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().
|
inline |
Definition at line 82 of file Accessor.hpp.
References wmtk::attribute::AccessorBase< _T, Dim >::mesh().
|
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().
|
inline |
Definition at line 45 of file AccessorBase.hxx.
Referenced by wmtk::Mesh::request_simplex_indices(), and wmtk::Mesh::set_capacities_from_flags().
T& wmtk::attribute::Accessor< T, MeshType, Dim >::scalar_attribute | ( | const ArgType & | t | ) |
Referenced by wmtk::components::Marching::process(), wmtk::components::internal::RegularSpace::regularize_tags(), wmtk::multimesh::utils::internal::TupleTag::set_edge_tag(), wmtk::components::TagAttribute::set_tag(), wmtk::multimesh::utils::internal::TupleTag::set_vertex_tag(), and TEST_CASE().
auto wmtk::attribute::Accessor< T, MeshType, Dim >::scalar_attribute | ( | const ArgType & | t | ) | -> T& |
Definition at line 104 of file Accessor.hxx.
|
inline |
Definition at line 54 of file CachingAccessor.hxx.
T& wmtk::attribute::Accessor< T, MeshType, Dim >::topological_scalar_attribute | ( | const ArgType & | t | ) |
auto wmtk::attribute::Accessor< T, MeshType, Dim >::topological_scalar_attribute | ( | const ArgType & | t | ) | -> T& |
Definition at line 119 of file Accessor.hxx.
|
inline |
Definition at line 75 of file AccessorBase.hxx.
MapResult<D> wmtk::attribute::Accessor< T, MeshType, Dim >::vector_attribute | ( | const ArgType & | t | ) |
Referenced by wmtk::operations::CollapseNewAttributeStrategy< T >::assign_collapsed(), wmtk::operations::SplitNewAttributeStrategy< T >::assign_split(), wmtk::operations::SplitNewAttributeStrategy< T >::assign_split_ribs(), wmtk::components::internal::MultiMeshFromTag::build_adjacency_matrix(), wmtk::components::internal::MultiMeshFromTag::compute_substructure_ids(), and wmtk::operations::composite::ProjectOperation::execute().
auto wmtk::attribute::Accessor< T, MeshType, Dim >::vector_attribute | ( | const ArgType & | t | ) | -> MapResult<D> |
Definition at line 96 of file Accessor.hxx.
|
friend |
Definition at line 30 of file Accessor.hpp.
|
friend |
Definition at line 27 of file Accessor.hpp.
|
friend |
Definition at line 31 of file Accessor.hpp.
|
friend |
Definition at line 28 of file Accessor.hpp.
|
friend |
Definition at line 29 of file Accessor.hpp.