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

Container for saving data related to mesh entities. More...

#include <attribute_set.hpp>

Public Types

typedef DataType_ DataType
 

Public Member Functions

 AttributeSet (AttributeSet &&other)
 move constructor More...
 
 AttributeSet (Index num_values, int dimension=1)
 Constructor. More...
 
virtual ~AttributeSet ()
 virtual destructor More...
 
std::size_t bytes () const
 
AttributeSet clone () const
 
void clone (const AttributeSet &other)
 
int get_dimension () const
 Returns the number attribute dimension. More...
 
Index get_num_values () const
 Returns the number of attribute values. More...
 
DataTypeoperator() (Index i, int j)
 Returns a reference to an attribute value entry. More...
 
const DataTypeoperator() (Index i, int j) const
 Returns a const reference to an attribute value entry. More...
 
AttributeSetoperator= (AttributeSet &&other)
 move-assignment operator More...
 

Static Public Member Functions

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

Protected Attributes

int _dimension
 Number of entries per attribute value. More...
 
Index _num_values
 Number of attribute values. More...
 
std::vector< DataType_values
 Value array. More...
 

Detailed Description

template<typename DataType_>
class FEAT::Geometry::AttributeSet< DataType_ >

Container for saving data related to mesh entities.

This class template implements a container for saving attributes of vertices and is used in MeshPart. The attributes do not need to be scalar.

Template Parameters
DataType_The datatype for an attribute value entry.
Author
Peter Zajac

Definition at line 31 of file attribute_set.hpp.

Member Typedef Documentation

◆ DataType

template<typename DataType_ >
typedef DataType_ FEAT::Geometry::AttributeSet< DataType_ >::DataType

Type for the values in the attributes; This usually coincides with the CoordType of the mesh

Definition at line 36 of file attribute_set.hpp.

Constructor & Destructor Documentation

◆ AttributeSet() [1/2]

template<typename DataType_ >
FEAT::Geometry::AttributeSet< DataType_ >::AttributeSet ( Index  num_values,
int  dimension = 1 
)
inlineexplicit

Constructor.

Parameters
[in]num_valuesThe number of values to be allocated.
[in]dimensionThe dimension of the attribute. Must be > 0.

Definition at line 56 of file attribute_set.hpp.

References FEAT::Geometry::AttributeSet< DataType_ >::_values, and XASSERT.

◆ AttributeSet() [2/2]

template<typename DataType_ >
FEAT::Geometry::AttributeSet< DataType_ >::AttributeSet ( AttributeSet< DataType_ > &&  other)
inline

move constructor

Definition at line 68 of file attribute_set.hpp.

◆ ~AttributeSet()

template<typename DataType_ >
virtual FEAT::Geometry::AttributeSet< DataType_ >::~AttributeSet ( )
inlinevirtual

virtual destructor

Definition at line 90 of file attribute_set.hpp.

Member Function Documentation

◆ bytes()

template<typename DataType_ >
std::size_t FEAT::Geometry::AttributeSet< DataType_ >::bytes ( ) const
inline
Returns
The size of dynamically allocated memory in bytes.

Definition at line 109 of file attribute_set.hpp.

References FEAT::Geometry::AttributeSet< DataType_ >::_dimension, and FEAT::Geometry::AttributeSet< DataType_ >::_values.

◆ clone() [1/2]

template<typename DataType_ >
AttributeSet FEAT::Geometry::AttributeSet< DataType_ >::clone ( ) const
inline

Definition at line 101 of file attribute_set.hpp.

◆ clone() [2/2]

template<typename DataType_ >
void FEAT::Geometry::AttributeSet< DataType_ >::clone ( const AttributeSet< DataType_ > &  other)
inline

Definition at line 94 of file attribute_set.hpp.

◆ get_dimension()

template<typename DataType_ >
int FEAT::Geometry::AttributeSet< DataType_ >::get_dimension ( ) const
inline

◆ get_num_values()

template<typename DataType_ >
Index FEAT::Geometry::AttributeSet< DataType_ >::get_num_values ( ) const
inline

◆ name()

template<typename DataType_ >
static String FEAT::Geometry::AttributeSet< DataType_ >::name ( )
inlinestatic

Returns the name of the class.

Definition at line 184 of file attribute_set.hpp.

◆ operator()() [1/2]

template<typename DataType_ >
DataType & FEAT::Geometry::AttributeSet< DataType_ >::operator() ( Index  i,
int  j 
)
inline

Returns a reference to an attribute value entry.

Parameters
[in]iThe index of the attribute value to be returned.
[in]jThe index of the attribute value component to be returned.
Returns
A reference to j-th component of the i-th attribute value.

Definition at line 142 of file attribute_set.hpp.

References FEAT::Geometry::AttributeSet< DataType_ >::_dimension, FEAT::Geometry::AttributeSet< DataType_ >::_num_values, FEAT::Geometry::AttributeSet< DataType_ >::_values, and ASSERT.

◆ operator()() [2/2]

template<typename DataType_ >
const DataType & FEAT::Geometry::AttributeSet< DataType_ >::operator() ( Index  i,
int  j 
) const
inline

Returns a const reference to an attribute value entry.

Parameters
[in]iThe index of the attribute value to be returned.
[in]jThe index of the attribute value component to be returned.
Returns
A const reference to j-th component of the i-th attribute value.

Definition at line 161 of file attribute_set.hpp.

References FEAT::Geometry::AttributeSet< DataType_ >::_dimension, FEAT::Geometry::AttributeSet< DataType_ >::_num_values, FEAT::Geometry::AttributeSet< DataType_ >::_values, and ASSERT.

◆ operator=()

template<typename DataType_ >
AttributeSet & FEAT::Geometry::AttributeSet< DataType_ >::operator= ( AttributeSet< DataType_ > &&  other)
inline

Member Data Documentation

◆ _dimension

◆ _num_values

template<typename DataType_ >
Index FEAT::Geometry::AttributeSet< DataType_ >::_num_values
protected

◆ _values


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