ug4
ug::LocalVector Class Reference

#include <local_algebra.h>

Public Types

typedef LocalVector this_type
 own type More...
 
typedef number value_type
 Type to store DoF values. More...
 

Public Member Functions

void access_all ()
 access all functions More...
 
void access_by_map (const FunctionIndexMapping &funcMap)
 access only part of the functions using mapping (restrict functions) More...
 
const LocalIndicesget_indices () const
 get current local indices More...
 
const LFEIDlocal_finite_element_id (size_t fct) const
 returns the local finite element id of a function More...
 
 LocalVector ()
 default Constructor More...
 
 LocalVector (const LocalIndices &ind)
 Constructor. More...
 
size_t num_all_dof (size_t fct) const
 returns the number of dofs for a function (unrestricted functions) More...
 
size_t num_all_fct () const
 returns the number of all functions More...
 
size_t num_dof (size_t fct) const
 returns the number of dofs for the currently accessible function More...
 
size_t num_fct () const
 returns the number of currently accessible functions More...
 
numberoperator() (size_t fct, size_t dof)
 access to dof of currently accessible function fct More...
 
number operator() (size_t fct, size_t dof) const
 const access to dof of currently accessible function fct More...
 
this_typeoperator* (number val)
 multiply all components of the vector More...
 
this_typeoperator*= (number val)
 multiply all components of the vector More...
 
this_typeoperator+= (const this_type &rhs)
 add a local vector More...
 
this_typeoperator-= (const this_type &rhs)
 subtract a local vector More...
 
this_typeoperator= (const this_type &other)
 
this_typeoperator= (number val)
 set all components of the vector More...
 
void resize (const LocalIndices &ind)
 resize for current local indices More...
 
this_typescale_append (number s, const this_type &rhs)
 add a scaled vector More...
 
numbervalue (size_t fct, size_t dof)
 access to dof of a fct (unrestricted functions) More...
 
const numbervalue (size_t fct, size_t dof) const
 const access to dof of a fct (unrestricted functions) More...
 

Protected Member Functions

void check_all_dof (size_t fct, size_t dof) const
 checks correct dof index in debug mode More...
 
void check_all_fct (size_t fct) const
 checks correct fct index in debug mode More...
 
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

const FunctionIndexMappingm_pFuncMap
 Access Mapping. More...
 
const LocalIndicesm_pIndex
 Indices. More...
 
std::vector< std::vector< value_type > > m_vvValue
 Entries (fct, dof) More...
 
std::vector< value_type * > m_vvValueAcc
 Entries (fct, dof) More...
 

Member Typedef Documentation

◆ this_type

◆ value_type

Type to store DoF values.

Constructor & Destructor Documentation

◆ LocalVector() [1/2]

ug::LocalVector::LocalVector ( )
inline

default Constructor

References m_vvValue.

◆ LocalVector() [2/2]

ug::LocalVector::LocalVector ( const LocalIndices ind)
inline

Constructor.

References resize().

Member Function Documentation

◆ access_all()

void ug::LocalVector::access_all ( )
inline

access all functions

References m_pFuncMap, m_pIndex, m_vvValue, m_vvValueAcc, and ug::LocalIndices::num_fct().

Referenced by operator=(), and resize().

◆ access_by_map()

◆ check_all_dof()

void ug::LocalVector::check_all_dof ( size_t  fct,
size_t  dof 
) const
inlineprotected

checks correct dof index in debug mode

References check_all_fct(), num_all_dof(), and UG_LOCALALGEBRA_ASSERT.

Referenced by value().

◆ check_all_fct()

void ug::LocalVector::check_all_fct ( size_t  fct) const
inlineprotected

checks correct fct index in debug mode

References num_all_fct(), and UG_LOCALALGEBRA_ASSERT.

Referenced by check_all_dof(), and num_all_dof().

◆ check_dof()

void ug::LocalVector::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 operator()().

◆ check_fct()

void ug::LocalVector::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(), local_finite_element_id(), and num_dof().

◆ get_indices()

const LocalIndices& ug::LocalVector::get_indices ( ) const
inline

◆ local_finite_element_id()

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

returns the local finite element id of a function

References check_fct(), ug::LocalIndices::local_finite_element_id(), m_pFuncMap, m_pIndex, and UG_ASSERT.

◆ num_all_dof()

size_t ug::LocalVector::num_all_dof ( size_t  fct) const
inline

◆ num_all_fct()

size_t ug::LocalVector::num_all_fct ( ) const
inline

◆ num_dof()

size_t ug::LocalVector::num_dof ( size_t  fct) const
inline

returns the number of dofs for the currently accessible function

References check_fct(), m_pFuncMap, and m_vvValue.

Referenced by check_dof(), and ug::operator<<().

◆ num_fct()

◆ operator()() [1/2]

number& ug::LocalVector::operator() ( size_t  fct,
size_t  dof 
)
inline

access to dof of currently accessible function fct

References check_dof(), and m_vvValueAcc.

◆ operator()() [2/2]

number ug::LocalVector::operator() ( size_t  fct,
size_t  dof 
) const
inline

const access to dof of currently accessible function fct

References check_dof(), and m_vvValueAcc.

◆ operator*()

this_type& ug::LocalVector::operator* ( number  val)
inline

multiply all components of the vector

References operator*=().

◆ operator*=()

this_type& ug::LocalVector::operator*= ( number  val)
inline

multiply all components of the vector

References m_vvValue.

Referenced by operator*().

◆ operator+=()

this_type& ug::LocalVector::operator+= ( const this_type rhs)
inline

add a local vector

References m_pIndex, m_vvValue, and UG_LOCALALGEBRA_ASSERT.

◆ operator-=()

this_type& ug::LocalVector::operator-= ( const this_type rhs)
inline

subtract a local vector

References m_pIndex, m_vvValue, and UG_LOCALALGEBRA_ASSERT.

◆ operator=() [1/2]

◆ operator=() [2/2]

this_type& ug::LocalVector::operator= ( number  val)
inline

set all components of the vector

References m_vvValue.

◆ resize()

void ug::LocalVector::resize ( const LocalIndices ind)
inline

resize for current local indices

References access_all(), m_pIndex, m_vvValue, m_vvValueAcc, ug::LocalIndices::num_dof(), and ug::LocalIndices::num_fct().

Referenced by ug::ActiveSet< TDomain, TAlgebra >::active_index_elem(), ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >::AssembleDefect(), ug::StdGlobAssembler< TDomain, TAlgebra >::AssembleDefect(), ug::StdGlobAssembler< TDomain, TAlgebra >::AssembleErrorEstimator(), ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >::AssembleJacobian(), ug::StdGlobAssembler< TDomain, TAlgebra >::AssembleJacobian(), ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >::AssembleLinear(), ug::StdGlobAssembler< TDomain, TAlgebra >::AssembleLinear(), ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >::AssembleMassMatrix(), ug::StdGlobAssembler< TDomain, TAlgebra >::AssembleMassMatrix(), ug::StdGlobAssembler< TDomain, TAlgebra >::AssembleRhs(), ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >::AssembleStiffnessMatrix(), ug::StdGlobAssembler< TDomain, TAlgebra >::AssembleStiffnessMatrix(), ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::calc_error(), ug::ActiveSet< TDomain, TAlgebra >::check_conv_elem(), ug::H1SemiDistIntegrand< TGridFunction >::evaluate(), ug::H1EnergyDistIntegrand< TGridFunction >::evaluate(), ug::UserDataIntegrandSq< TData, TGridFunction >::evaluate(), ug::H1SemiIntegrand< TGridFunction >::evaluate(), ug::H1EnergyIntegrand< TGridFunction >::evaluate(), ug::UserDataDistIntegrandSq< TData, TGridFunction >::evaluate(), ug::UserDataIntegrand< TData, TGridFunction >::evaluate(), ug::bridge::Evaluate::NumberValuedUserDataEvaluator< TDomain, TAlgebra >::evaluateOnThisProcess(), ug::bridge::Evaluate::VectorValuedUserDataEvaluator< TDomain, TAlgebra >::evaluateOnThisProcess(), ug::bridge::Evaluate::VectorValuedUserDataEvaluator< TDomain, TAlgebra >::evaluateOnThisProcessNeighbouring(), ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >::FinishTimestepElem(), ug::StdGlobAssembler< TDomain, TAlgebra >::FinishTimestepElem(), LocalVector(), operator=(), ug::NLGaussSeidelSolver< TDomain, TAlgebra >::prepare(), ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >::PrepareTimestepElem(), ug::StdGlobAssembler< TDomain, TAlgebra >::PrepareTimestepElem(), ug::VTKOutput< TDim >::write_cell_data_elementwise(), and ug::VTKOutput< TDim >::write_nodal_data_elementwise().

◆ scale_append()

◆ value() [1/2]

number& ug::LocalVector::value ( size_t  fct,
size_t  dof 
)
inline

access to dof of a fct (unrestricted functions)

References check_all_dof(), and m_vvValue.

Referenced by ug::LocalToGlobalMapperNLGS< TAlgebra >::add_local_vec_to_global(), ug::AddLocalVector(), and ug::GetLocalVector().

◆ value() [2/2]

const number& ug::LocalVector::value ( size_t  fct,
size_t  dof 
) const
inline

const access to dof of a fct (unrestricted functions)

References check_all_dof(), and m_vvValue.

Member Data Documentation

◆ m_pFuncMap

const FunctionIndexMapping* ug::LocalVector::m_pFuncMap
protected

◆ m_pIndex

const LocalIndices* ug::LocalVector::m_pIndex
protected

◆ m_vvValue

std::vector<std::vector<value_type> > ug::LocalVector::m_vvValue
protected

◆ m_vvValueAcc

std::vector<value_type*> ug::LocalVector::m_vvValueAcc
protected

Entries (fct, dof)

Referenced by access_all(), access_by_map(), operator()(), operator=(), and resize().


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