ug4
ug::LocalIndices Class Reference

#include <local_algebra.h>

Public Types

typedef index_type comp_type
 Component type used by algebra. More...
 
typedef size_t index_type
 Index type used by algebra. More...
 

Public Member Functions

void clear ()
 clears all fct More...
 
void clear_dof (size_t fct)
 clears the dofs of a function More...
 
comp_typecomp (size_t fct, size_t dof)
 algebra comp for (fct, dof) More...
 
comp_type comp (size_t fct, size_t dof) const
 algebra comp for (fct, dof) More...
 
bool contains_index (index_type ind)
 checks if the local index object references a given index More...
 
index_typeindex (size_t fct, size_t dof)
 global algebra index for (fct, dof) More...
 
index_type index (size_t fct, size_t dof) const
 global algebra index for (fct, dof) More...
 
const LFEIDlocal_finite_element_id (size_t fct) const
 returns the local finite element id of a function More...
 
 LocalIndices ()
 Default Constructor. More...
 
const DoFIndexmulti_index (size_t fct, size_t dof) const
 global algebra multi-index for (fct, dof) More...
 
size_t num_dof () const
 number of dofs of all accessible (sum) More...
 
size_t num_dof (size_t fct) const
 number of dofs for accessible function More...
 
size_t num_fct () const
 number of functions More...
 
void push_back_index (size_t fct, size_t index)
 adds an index (increases size) More...
 
void push_back_multi_index (size_t fct, size_t index, size_t comp)
 adds an index (increases size) More...
 
void reserve_dof (size_t fct, size_t numDoF)
 reserves memory for the number of dofs More...
 
void resize_dof (size_t fct, size_t numDoF)
 sets the number of dofs of a function More...
 
void resize_fct (size_t numFct)
 sets the number of functions More...
 
void set_lfeID (size_t fct, const LFEID &lfeID)
 sets the local finite element id for a function More...
 

Protected Member Functions

void check_dof (size_t fct, size_t dof) const
 checks correct dof index in debug mode More...
 
void check_fct (size_t fct) const
 checks correct fct index in debug mode More...
 

Protected Attributes

std::vector< LFEIDm_vLFEID
 
std::vector< std::vector< DoFIndex > > m_vvIndex
 

Member Typedef Documentation

◆ comp_type

Component type used by algebra.

◆ index_type

Index type used by algebra.

Constructor & Destructor Documentation

◆ LocalIndices()

ug::LocalIndices::LocalIndices ( )
inline

Default Constructor.

Member Function Documentation

◆ check_dof()

void ug::LocalIndices::check_dof ( size_t  fct,
size_t  dof 
) const
inlineprotected

checks correct dof index in debug mode

References check_fct(), num_dof(), and UG_LOCALALGEBRA_ASSERT.

Referenced by comp(), index(), and multi_index().

◆ check_fct()

void ug::LocalIndices::check_fct ( size_t  fct) const
inlineprotected

checks correct fct index in debug mode

References num_fct(), and UG_LOCALALGEBRA_ASSERT.

Referenced by check_dof(), num_dof(), push_back_multi_index(), reserve_dof(), and resize_dof().

◆ clear()

void ug::LocalIndices::clear ( )
inline

clears all fct

References m_vvIndex.

◆ clear_dof()

void ug::LocalIndices::clear_dof ( size_t  fct)
inline

clears the dofs of a function

References resize_dof().

Referenced by ug::DoFDistribution::_indices().

◆ comp() [1/2]

comp_type& ug::LocalIndices::comp ( size_t  fct,
size_t  dof 
)
inline

algebra comp for (fct, dof)

References check_dof(), and m_vvIndex.

◆ comp() [2/2]

◆ contains_index()

bool ug::LocalIndices::contains_index ( index_type  ind)
inline

checks if the local index object references a given index

References m_vvIndex, num_dof(), and num_fct().

◆ index() [1/2]

index_type& ug::LocalIndices::index ( size_t  fct,
size_t  dof 
)
inline

global algebra index for (fct, dof)

References check_dof(), and m_vvIndex.

◆ index() [2/2]

◆ local_finite_element_id()

const LFEID& ug::LocalIndices::local_finite_element_id ( size_t  fct) const
inline

returns the local finite element id of a function

References m_vLFEID, and UG_ASSERT.

Referenced by ug::LocalVector::local_finite_element_id().

◆ multi_index()

const DoFIndex& ug::LocalIndices::multi_index ( size_t  fct,
size_t  dof 
) const
inline

global algebra multi-index for (fct, dof)

References check_dof(), and m_vvIndex.

Referenced by ug::FV1InnerBoundaryElemDisc< TImpl, TDomain >::prep_elem().

◆ num_dof() [1/2]

size_t ug::LocalIndices::num_dof ( ) const
inline

number of dofs of all accessible (sum)

References num_fct().

Referenced by check_dof(), and contains_index().

◆ num_dof() [2/2]

◆ num_fct()

◆ push_back_index()

◆ push_back_multi_index()

void ug::LocalIndices::push_back_multi_index ( size_t  fct,
size_t  index,
size_t  comp 
)
inline

◆ reserve_dof()

void ug::LocalIndices::reserve_dof ( size_t  fct,
size_t  numDoF 
)
inline

reserves memory for the number of dofs

References check_fct(), and m_vvIndex.

◆ resize_dof()

void ug::LocalIndices::resize_dof ( size_t  fct,
size_t  numDoF 
)
inline

sets the number of dofs of a function

References check_fct(), and m_vvIndex.

Referenced by clear_dof().

◆ resize_fct()

void ug::LocalIndices::resize_fct ( size_t  numFct)
inline

sets the number of functions

References m_vLFEID, and m_vvIndex.

Referenced by ug::DoFDistribution::_indices().

◆ set_lfeID()

void ug::LocalIndices::set_lfeID ( size_t  fct,
const LFEID lfeID 
)
inline

sets the local finite element id for a function

References m_vLFEID, and UG_ASSERT.

Member Data Documentation

◆ m_vLFEID

std::vector<LFEID> ug::LocalIndices::m_vLFEID
protected

◆ m_vvIndex

std::vector<std::vector<DoFIndex> > ug::LocalIndices::m_vvIndex
protected

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