FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Geometry::IndexSet< num_indices_ > Class Template Reference

Conformal Index-Set class template. More...

#include <index_set.hpp>

Public Types

typedef const IndexImageIterator
 ImageIterator type for Adjactor interface implementation. More...
 
typedef IndexTuple< num_indicesIndexTupleType
 index tuple type More...
 

Public Member Functions

 IndexSet (Index num_entities=0, Index index_bound=0)
 Constructor. More...
 
 IndexSet (IndexSet &&other)
 move constructor More...
 
virtual ~IndexSet ()
 virtual destructor More...
 
std::size_t bytes () const
 
IndexSet clone () const
 
Index get_index_bound () const
 Returns the index bound. More...
 
IndexTupleTypeget_indices ()
 Returns the index vector array. More...
 
const IndexTupleTypeget_indices () const
 Returns the index vector array. More...
 
Index get_num_entities () const
 Returns the number of entities. More...
 
int get_num_indices () const
 Returns the number of indices per entity. More...
 
Index get_num_nodes_domain () const
 Returns the number of domain nodes. More...
 
Index get_num_nodes_image () const
 Returns the number of image nodes. More...
 
ImageIterator image_begin (Index domain_node) const
 Returns an iterator for the first adjacent image node. More...
 
ImageIterator image_end (Index domain_node) const
 Returns an iterator for the first position past the last adjacent image node. More...
 
Indexoperator() (Index i, int j)
 Maps a face index. More...
 
const Indexoperator() (Index i, int j) const
 Maps a face index. More...
 
IndexSetoperator= (IndexSet &&other)
 move-assignment operator More...
 
IndexTupleTypeoperator[] (Index i)
 Returns a reference to an index tuple. More...
 
const IndexTupleTypeoperator[] (Index i) const
 Returns a reference to an index tuple. More...
 
void permute (const Adjacency::Permutation &perm, const Adjacency::Permutation &inv_perm_face)
 Permutes this index set in-situ. More...
 
void set_index_bound (Index bound)
 Sets the index bound. More...
 

Static Public Member Functions

static String name ()
 Returns the name of the class. More...
 

Static Public Attributes

static constexpr int num_indices = num_indices_
 number of indices per entry More...
 

Protected Member Functions

 IndexSet (Index idx_bnd, const std::vector< IndexTupleType > &idx)
 internal clone constructor More...
 

Protected Attributes

Index _index_bound
 
std::vector< IndexTupleType_indices
 index vector array More...
 

Detailed Description

template<int num_indices_>
class FEAT::Geometry::IndexSet< num_indices_ >

Conformal Index-Set class template.

This is used for storing information about i.e. which vertices are present in each

  • edge
  • face
  • cell

and similar types of information, like edges@faces, edges@cells, faces@cells, depending on the dimension.

Author
Peter Zajac

Definition at line 81 of file index_set.hpp.

Member Typedef Documentation

◆ ImageIterator

template<int num_indices_>
typedef const Index* FEAT::Geometry::IndexSet< num_indices_ >::ImageIterator

ImageIterator type for Adjactor interface implementation.

Definition at line 93 of file index_set.hpp.

◆ IndexTupleType

template<int num_indices_>
typedef IndexTuple<num_indices> FEAT::Geometry::IndexSet< num_indices_ >::IndexTupleType

index tuple type

Definition at line 90 of file index_set.hpp.

Constructor & Destructor Documentation

◆ IndexSet() [1/3]

template<int num_indices_>
FEAT::Geometry::IndexSet< num_indices_ >::IndexSet ( Index  idx_bnd,
const std::vector< IndexTupleType > &  idx 
)
inlineexplicitprotected

internal clone constructor

Definition at line 104 of file index_set.hpp.

◆ IndexSet() [2/3]

template<int num_indices_>
FEAT::Geometry::IndexSet< num_indices_ >::IndexSet ( Index  num_entities = 0,
Index  index_bound = 0 
)
inlineexplicit

Constructor.

Parameters
[in]num_entitiesThe number of entities for the index set.
[in]index_boundThe index bound.

Definition at line 119 of file index_set.hpp.

◆ IndexSet() [3/3]

template<int num_indices_>
FEAT::Geometry::IndexSet< num_indices_ >::IndexSet ( IndexSet< num_indices_ > &&  other)
inline

move constructor

Definition at line 129 of file index_set.hpp.

◆ ~IndexSet()

template<int num_indices_>
virtual FEAT::Geometry::IndexSet< num_indices_ >::~IndexSet ( )
inlinevirtual

virtual destructor

Definition at line 149 of file index_set.hpp.

Member Function Documentation

◆ bytes()

template<int num_indices_>
std::size_t FEAT::Geometry::IndexSet< num_indices_ >::bytes ( ) const
inline
Returns
The size of dynamically allocated memory in bytes.

Definition at line 160 of file index_set.hpp.

References FEAT::Geometry::IndexSet< num_indices_ >::_indices.

◆ clone()

template<int num_indices_>
IndexSet FEAT::Geometry::IndexSet< num_indices_ >::clone ( ) const
inline
Returns
An independent clone of this target set object.

Definition at line 154 of file index_set.hpp.

◆ get_index_bound()

template<int num_indices_>
Index FEAT::Geometry::IndexSet< num_indices_ >::get_index_bound ( ) const
inline

◆ get_indices() [1/2]

template<int num_indices_>
IndexTupleType * FEAT::Geometry::IndexSet< num_indices_ >::get_indices ( )
inline

Returns the index vector array.

Returns
The index vector array.

Definition at line 200 of file index_set.hpp.

References FEAT::Geometry::IndexSet< num_indices_ >::_indices.

◆ get_indices() [2/2]

template<int num_indices_>
const IndexTupleType * FEAT::Geometry::IndexSet< num_indices_ >::get_indices ( ) const
inline

Returns the index vector array.

Returns
The index vector array.

Definition at line 206 of file index_set.hpp.

References FEAT::Geometry::IndexSet< num_indices_ >::_indices.

◆ get_num_entities()

◆ get_num_indices()

template<int num_indices_>
int FEAT::Geometry::IndexSet< num_indices_ >::get_num_indices ( ) const
inline

Returns the number of indices per entity.

Returns
The number of indices per entity.

Definition at line 170 of file index_set.hpp.

Referenced by FEAT::Assembly::StokesFBMAssembler< MeshType_ >::_process_mask().

◆ get_num_nodes_domain()

template<int num_indices_>
Index FEAT::Geometry::IndexSet< num_indices_ >::get_num_nodes_domain ( ) const
inline

Returns the number of domain nodes.

Returns
The total number of domain nodes in the adjactor.

Definition at line 328 of file index_set.hpp.

References FEAT::Geometry::IndexSet< num_indices_ >::get_num_entities().

◆ get_num_nodes_image()

template<int num_indices_>
Index FEAT::Geometry::IndexSet< num_indices_ >::get_num_nodes_image ( ) const
inline

Returns the number of image nodes.

Returns
The total number of image nodes in the adjactor.

Definition at line 334 of file index_set.hpp.

References FEAT::Geometry::IndexSet< num_indices_ >::_index_bound.

◆ image_begin()

template<int num_indices_>
ImageIterator FEAT::Geometry::IndexSet< num_indices_ >::image_begin ( Index  domain_node) const
inline

Returns an iterator for the first adjacent image node.

Parameters
[in]domain_nodeThe index of the domain node whose image node iterator is to be returned.
Returns
An iterator representing the first image node adjacent to domain_node, or image_end(domain_node) if no adjacent image nodes exist.

Definition at line 340 of file index_set.hpp.

References FEAT::Geometry::IndexSet< num_indices_ >::_indices, ASSERT, and FEAT::Geometry::IndexSet< num_indices_ >::get_num_entities().

◆ image_end()

template<int num_indices_>
ImageIterator FEAT::Geometry::IndexSet< num_indices_ >::image_end ( Index  domain_node) const
inline

Returns an iterator for the first position past the last adjacent image node.

Parameters
[in]domain_nodeThe index of the domain node whose image node iterator is to be returned.
Returns
An iterator representing the first position past the last image node adjacent to domain_node.

Definition at line 347 of file index_set.hpp.

References FEAT::Geometry::IndexSet< num_indices_ >::_indices, ASSERT, and FEAT::Geometry::IndexSet< num_indices_ >::get_num_entities().

◆ name()

template<int num_indices_>
static String FEAT::Geometry::IndexSet< num_indices_ >::name ( )
inlinestatic

Returns the name of the class.

Returns
The name of the class as a String.

Definition at line 319 of file index_set.hpp.

References FEAT::stringify().

◆ operator()() [1/2]

template<int num_indices_>
Index & FEAT::Geometry::IndexSet< num_indices_ >::operator() ( Index  i,
int  j 
)
inline

Maps a face index.

Parameters
[in]iThe index of the entity whose face index is to be returned.
[in]jThe index of the local face that is to be mapped.
Returns
A (const) reference to the index of the local face j on entity i.

Definition at line 245 of file index_set.hpp.

References FEAT::Geometry::IndexSet< num_indices_ >::_indices, ASSERT, FEAT::Geometry::IndexSet< num_indices_ >::get_num_entities(), and FEAT::Geometry::IndexSet< num_indices_ >::num_indices.

◆ operator()() [2/2]

template<int num_indices_>
const Index & FEAT::Geometry::IndexSet< num_indices_ >::operator() ( Index  i,
int  j 
) const
inline

Maps a face index.

Parameters
[in]iThe index of the entity whose face index is to be returned.
[in]jThe index of the local face that is to be mapped.
Returns
A (const) reference to the index of the local face j on entity i.

Definition at line 265 of file index_set.hpp.

References FEAT::Geometry::IndexSet< num_indices_ >::_indices, ASSERT, FEAT::Geometry::IndexSet< num_indices_ >::get_num_entities(), and FEAT::Geometry::IndexSet< num_indices_ >::num_indices.

◆ operator=()

template<int num_indices_>
IndexSet & FEAT::Geometry::IndexSet< num_indices_ >::operator= ( IndexSet< num_indices_ > &&  other)
inline

◆ operator[]() [1/2]

template<int num_indices_>
IndexTupleType & FEAT::Geometry::IndexSet< num_indices_ >::operator[] ( Index  i)
inline

Returns a reference to an index tuple.

Parameters
[in]iThe index of the entity whose index tuple is to be returned.
Returns
A (const) reference to the index tuple of the entity.

Definition at line 220 of file index_set.hpp.

References FEAT::Geometry::IndexSet< num_indices_ >::_indices, ASSERT, and FEAT::Geometry::IndexSet< num_indices_ >::get_num_entities().

◆ operator[]() [2/2]

template<int num_indices_>
const IndexTupleType & FEAT::Geometry::IndexSet< num_indices_ >::operator[] ( Index  i) const
inline

Returns a reference to an index tuple.

Parameters
[in]iThe index of the entity whose index tuple is to be returned.
Returns
A (const) reference to the index tuple of the entity.

Definition at line 227 of file index_set.hpp.

References FEAT::Geometry::IndexSet< num_indices_ >::_indices, ASSERT, and FEAT::Geometry::IndexSet< num_indices_ >::get_num_entities().

◆ permute()

template<int num_indices_>
void FEAT::Geometry::IndexSet< num_indices_ >::permute ( const Adjacency::Permutation perm,
const Adjacency::Permutation inv_perm_face 
)
inline

Permutes this index set in-situ.

\perm[in] perm A transient reference to the permutation of the shape indices.

Parameters
[in]inv_perm_faceA transient reference to the inverse permutation of the face indices.

Definition at line 292 of file index_set.hpp.

References FEAT::Geometry::IndexSet< num_indices_ >::_indices, FEAT::Adjacency::Permutation::apply(), FEAT::Adjacency::Permutation::empty(), FEAT::Geometry::IndexSet< num_indices_ >::get_index_bound(), FEAT::Geometry::IndexSet< num_indices_ >::get_num_entities(), FEAT::Adjacency::Permutation::size(), and XASSERT.

◆ set_index_bound()

template<int num_indices_>
void FEAT::Geometry::IndexSet< num_indices_ >::set_index_bound ( Index  bound)
inline

Sets the index bound.

Parameters
[in]boundThe new index bound.

Definition at line 278 of file index_set.hpp.

References FEAT::Geometry::IndexSet< num_indices_ >::_index_bound.

Member Data Documentation

◆ _index_bound

template<int num_indices_>
Index FEAT::Geometry::IndexSet< num_indices_ >::_index_bound
protected

index bound;, i.e. number of edges if the IndexSet is to hold the information edges@cells. Necessary for Adjactor implementation

Definition at line 98 of file index_set.hpp.

Referenced by FEAT::Geometry::IndexSet< num_indices_ >::get_index_bound(), FEAT::Geometry::IndexSet< num_indices_ >::get_num_nodes_image(), FEAT::Geometry::IndexSet< num_indices_ >::operator=(), and FEAT::Geometry::IndexSet< num_indices_ >::set_index_bound().

◆ _indices

◆ num_indices

template<int num_indices_>
constexpr int FEAT::Geometry::IndexSet< num_indices_ >::num_indices = num_indices_
staticconstexpr

number of indices per entry

Definition at line 87 of file index_set.hpp.

Referenced by FEAT::Geometry::PartiParMETIS::_compute_midpoints(), and FEAT::Geometry::IndexSet< num_indices_ >::operator()().


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