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

Stores the index representatives of an index set. More...

#include <index_calculator.hpp>

Classes

class  IndexVector
 Index vector. More...
 

Public Member Functions

 IndexTree (Index num_vertices)
 Constructor. More...
 
virtual ~IndexTree ()
 Destructor. More...
 
Index enumerate ()
 Enumerates the index vector representatives. More...
 
template<typename IndexVectorType_ >
std::pair< bool, Indexfind (const IndexVectorType_ &index_vector) const
 Searches for an index vector within the tree. More...
 
Index get_index (Index i, Index j, int k) const
 returns the value of the k-th component of the j-th index-representative in the i-th set More...
 
int get_num_indices () const
 returns number of indices of an index-representative More...
 
Index get_set_size (Index i) const
 returns size of the i-th representative set More...
 
template<typename IndexVectorType_ >
void insert (const IndexVectorType_ &index_vector, Index id)
 Inserts an index vector's representative into the index tree. More...
 
template<typename IndexSet_ >
void parse (const IndexSet_ &index_set)
 Parses an index set into the tree. More...
 

Static Public Member Functions

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

Static Public Attributes

static constexpr int num_indices = Shape::FaceTraits<Shape_, 0>::count
 number of indices per index vector More...
 

Private Types

typedef std::set< IndexVectorRepSet
 Set of IndexVector representatives. More...
 
typedef std::vector< RepSetRepSetVector
 Vector of IV rep sets. More...
 

Private Attributes

RepSetVector _rep_set_vec
 representative set vector More...
 

Detailed Description

template<typename Shape_>
class FEAT::Geometry::IndexTree< Shape_ >

Stores the index representatives of an index set.

Todo:
detailed description
Author
Constantin Christof

Definition at line 30 of file index_calculator.hpp.

Member Typedef Documentation

◆ RepSet

template<typename Shape_ >
typedef std::set<IndexVector> FEAT::Geometry::IndexTree< Shape_ >::RepSet
private

Set of IndexVector representatives.

Definition at line 85 of file index_calculator.hpp.

◆ RepSetVector

template<typename Shape_ >
typedef std::vector<RepSet> FEAT::Geometry::IndexTree< Shape_ >::RepSetVector
private

Vector of IV rep sets.

Definition at line 87 of file index_calculator.hpp.

Constructor & Destructor Documentation

◆ IndexTree()

template<typename Shape_ >
FEAT::Geometry::IndexTree< Shape_ >::IndexTree ( Index  num_vertices)
inlineexplicit

Constructor.

Parameters
[in]num_verticesThe total number of vertices in the mesh.

Definition at line 99 of file index_calculator.hpp.

◆ ~IndexTree()

template<typename Shape_ >
virtual FEAT::Geometry::IndexTree< Shape_ >::~IndexTree ( )
inlinevirtual

Destructor.

Definition at line 105 of file index_calculator.hpp.

Member Function Documentation

◆ enumerate()

template<typename Shape_ >
Index FEAT::Geometry::IndexTree< Shape_ >::enumerate ( )
inline

Enumerates the index vector representatives.

This function loops over all index vector representatives in the index tree and assigns an unique id to each representative. The ids are distributed in consecutive order beginning from zero.

Returns
The total number of representatives; coincides with the first unused id.

Definition at line 220 of file index_calculator.hpp.

References FEAT::Geometry::IndexTree< Shape_ >::_rep_set_vec.

Referenced by FEAT::Geometry::IndexCalculator< Shape_, face_dim_ >::compute_vertex_subshape().

◆ find()

template<typename Shape_ >
template<typename IndexVectorType_ >
std::pair< bool, Index > FEAT::Geometry::IndexTree< Shape_ >::find ( const IndexVectorType_ &  index_vector) const
inline

Searches for an index vector within the tree.

This function searches the index tree for an index vector's representative and, if found, returns its id within the tree.

Parameters
[in]index_vectorThe index vector whose representative is to be found.
Returns
A bool-Index-pair indicating the result of the search.
  • If the first (bool) component is true then the second (Index) component contains the id of the index vector within the tree.
  • If the first (bool) component is false then the index vector's representative was not found within the index tree.

Definition at line 147 of file index_calculator.hpp.

References FEAT::Geometry::IndexTree< Shape_ >::_rep_set_vec.

Referenced by FEAT::Geometry::IndexCalculator< Shape_, face_dim_ >::compute().

◆ get_index()

template<typename Shape_ >
Index FEAT::Geometry::IndexTree< Shape_ >::get_index ( Index  i,
Index  j,
int  k 
) const
inline

returns the value of the k-th component of the j-th index-representative in the i-th set

Definition at line 123 of file index_calculator.hpp.

References FEAT::Geometry::IndexTree< Shape_ >::_rep_set_vec.

Referenced by FEAT::Geometry::IndexCalculator< Shape_, face_dim_ >::compute_vertex_subshape().

◆ get_num_indices()

template<typename Shape_ >
int FEAT::Geometry::IndexTree< Shape_ >::get_num_indices ( ) const
inline

returns number of indices of an index-representative

Definition at line 110 of file index_calculator.hpp.

◆ get_set_size()

template<typename Shape_ >
Index FEAT::Geometry::IndexTree< Shape_ >::get_set_size ( Index  i) const
inline

returns size of the i-th representative set

Definition at line 116 of file index_calculator.hpp.

References FEAT::Geometry::IndexTree< Shape_ >::_rep_set_vec, and XASSERT.

Referenced by FEAT::Geometry::IndexCalculator< Shape_, face_dim_ >::compute_vertex_subshape().

◆ insert()

template<typename Shape_ >
template<typename IndexVectorType_ >
void FEAT::Geometry::IndexTree< Shape_ >::insert ( const IndexVectorType_ &  index_vector,
Index  id 
)
inline

Inserts an index vector's representative into the index tree.

Parameters
[in]index_vectorThe index vector whose representative is to be stored.
[in]idAn id that is to be associated with the index vector.

Definition at line 174 of file index_calculator.hpp.

References FEAT::Geometry::IndexTree< Shape_ >::_rep_set_vec, and ASSERTM.

Referenced by FEAT::Geometry::IndexCalculator< Shape_, face_dim_ >::compute_vertex_subshape(), and FEAT::Geometry::IndexTree< Shape_ >::parse().

◆ name()

template<typename Shape_ >
static String FEAT::Geometry::IndexTree< Shape_ >::name ( )
inlinestatic

Returns the class name.

Definition at line 244 of file index_calculator.hpp.

◆ parse()

template<typename Shape_ >
template<typename IndexSet_ >
void FEAT::Geometry::IndexTree< Shape_ >::parse ( const IndexSet_ &  index_set)
inline

Parses an index set into the tree.

Parameters
[in]index_setA transient reference to the index set that is to be parsed.

Definition at line 195 of file index_calculator.hpp.

References FEAT::Geometry::IndexTree< Shape_ >::insert(), and FEAT::Geometry::IndexTree< Shape_ >::num_indices.

Member Data Documentation

◆ _rep_set_vec

◆ num_indices

template<typename Shape_ >
constexpr int FEAT::Geometry::IndexTree< Shape_ >::num_indices = Shape::FaceTraits<Shape_, 0>::count
staticconstexpr

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