ug4
ug::LocalMatrix Class Reference

#include <local_algebra.h>

Public Types

typedef LocalMatrix this_type
 own type More...
 
typedef number value_type
 Entry type used by algebra. 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...
 
void access_by_map (const FunctionIndexMapping &rowFuncMap, const FunctionIndexMapping &colFuncMap)
 access only part of the functions using mapping (restrict functions) More...
 
const LocalIndicesget_col_indices () const
 get current local indices More...
 
const LocalIndicesget_row_indices () const
 get current local indices More...
 
 LocalMatrix ()
 Constructor. More...
 
 LocalMatrix (const LocalIndices &rowInd, const LocalIndices &colInd)
 Constructor. More...
 
size_t num_all_col_dof (size_t fct) const
 returns the number of dofs for a function More...
 
size_t num_all_col_fct () const
 returns the number of all functions More...
 
size_t num_all_row_dof (size_t fct) const
 returns the number of dofs for a function More...
 
size_t num_all_row_fct () const
 returns the number of all functions More...
 
size_t num_col_dof (size_t fct) const
 returns the number of dofs for the currently accessible (restricted) function More...
 
size_t num_col_fct () const
 returns the number of currently accessible (restricted) functions More...
 
size_t num_row_dof (size_t fct) const
 returns the number of dofs for the currently accessible (restricted) function More...
 
size_t num_row_fct () const
 returns the number of currently accessible (restricted) functions More...
 
numberoperator() (size_t rowFct, size_t rowDoF, size_t colFct, size_t colDoF)
 access to (restricted) coupling (rowFct, rowDoF) x (colFct, colDoF) More...
 
number operator() (size_t rowFct, size_t rowDoF, size_t colFct, size_t colDoF) const
 const access to (restricted) coupling (rowFct, rowDoF) x (colFct, colDoF) More...
 
this_typeoperator* (number val)
 multiply all entries More...
 
this_typeoperator*= (number val)
 multiply matrix More...
 
this_typeoperator+= (const this_type &rhs)
 add matrix More...
 
this_typeoperator-= (const this_type &rhs)
 subtract matrix More...
 
this_typeoperator= (number val)
 set all entries More...
 
void resize (const LocalIndices &ind)
 resize for same ind in row and column More...
 
void resize (const LocalIndices &rowInd, const LocalIndices &colInd)
 resize for current local indices More...
 
this_typescale_append (number s, const this_type &rhs)
 add scaled matrix More...
 
numbervalue (size_t rowFct, size_t rowDoF, size_t colFct, size_t colDoF)
 access to coupling (rowFct, rowDoF) x (colFct, colDoF) More...
 
number value (size_t rowFct, size_t rowDoF, size_t colFct, size_t colDoF) const
 const access to coupling (rowFct, rowDoF) x (colFct, colDoF) More...
 

Protected Types

typedef DenseMatrix< VariableArray2< LocalCplMatrix * > > FctCplAccMatrix
 
typedef DenseMatrix< VariableArray2< LocalCplMatrix > > FctCplMatrix
 
typedef DenseMatrix< VariableArray2< value_type > > LocalCplMatrix
 

Protected Member Functions

void check_all_dof (size_t rowFct, size_t rowDoF, size_t colFct, size_t colDoF) const
 checks correct (dof1,dof2) index in debug mode More...
 
void check_all_fct (size_t rowFct, size_t colFct) const
 checks correct (fct1,fct2) index in debug mode More...
 
void check_dof (size_t rowFct, size_t rowDoF, size_t colFct, size_t colDoF) const
 checks correct (dof1,dof2) index in debug mode More...
 
void check_fct (size_t rowFct, size_t colFct) const
 checks correct (fct1,fct2) index in debug mode More...
 

Protected Attributes

FctCplMatrix m_CplMat
 
FctCplAccMatrix m_CplMatAcc
 
const FunctionIndexMappingm_pColFuncMap
 Column Access Mapping. More...
 
const LocalIndicesm_pColIndex
 
const FunctionIndexMappingm_pRowFuncMap
 Row Access Mapping. More...
 
const LocalIndicesm_pRowIndex
 

Member Typedef Documentation

◆ FctCplAccMatrix

◆ FctCplMatrix

◆ LocalCplMatrix

◆ this_type

◆ value_type

Entry type used by algebra.

Constructor & Destructor Documentation

◆ LocalMatrix() [1/2]

ug::LocalMatrix::LocalMatrix ( )
inline

Constructor.

◆ LocalMatrix() [2/2]

ug::LocalMatrix::LocalMatrix ( const LocalIndices rowInd,
const LocalIndices colInd 
)
inline

Constructor.

References resize().

Member Function Documentation

◆ access_all()

void ug::LocalMatrix::access_all ( )
inline

◆ access_by_map() [1/2]

void ug::LocalMatrix::access_by_map ( const FunctionIndexMapping funcMap)
inline

◆ access_by_map() [2/2]

void ug::LocalMatrix::access_by_map ( const FunctionIndexMapping rowFuncMap,
const FunctionIndexMapping colFuncMap 
)
inline

access only part of the functions using mapping (restrict functions)

References m_CplMat, m_CplMatAcc, m_pColFuncMap, m_pRowFuncMap, and ug::FunctionIndexMapping::num_fct().

◆ check_all_dof()

void ug::LocalMatrix::check_all_dof ( size_t  rowFct,
size_t  rowDoF,
size_t  colFct,
size_t  colDoF 
) const
inlineprotected

checks correct (dof1,dof2) index in debug mode

References check_all_fct(), num_all_col_dof(), num_all_row_dof(), and UG_LOCALALGEBRA_ASSERT.

Referenced by value().

◆ check_all_fct()

void ug::LocalMatrix::check_all_fct ( size_t  rowFct,
size_t  colFct 
) const
inlineprotected

checks correct (fct1,fct2) index in debug mode

References num_all_col_fct(), num_all_row_fct(), and UG_LOCALALGEBRA_ASSERT.

Referenced by check_all_dof().

◆ check_dof()

void ug::LocalMatrix::check_dof ( size_t  rowFct,
size_t  rowDoF,
size_t  colFct,
size_t  colDoF 
) const
inlineprotected

checks correct (dof1,dof2) index in debug mode

References check_fct(), num_col_dof(), num_row_dof(), and UG_LOCALALGEBRA_ASSERT.

Referenced by operator()().

◆ check_fct()

void ug::LocalMatrix::check_fct ( size_t  rowFct,
size_t  colFct 
) const
inlineprotected

checks correct (fct1,fct2) index in debug mode

References num_col_fct(), num_row_fct(), and UG_LOCALALGEBRA_ASSERT.

Referenced by check_dof().

◆ get_col_indices()

const LocalIndices& ug::LocalMatrix::get_col_indices ( ) const
inline

◆ get_row_indices()

const LocalIndices& ug::LocalMatrix::get_row_indices ( ) const
inline

◆ num_all_col_dof()

size_t ug::LocalMatrix::num_all_col_dof ( size_t  fct) const
inline

◆ num_all_col_fct()

size_t ug::LocalMatrix::num_all_col_fct ( ) const
inline

◆ num_all_row_dof()

size_t ug::LocalMatrix::num_all_row_dof ( size_t  fct) const
inline

◆ num_all_row_fct()

size_t ug::LocalMatrix::num_all_row_fct ( ) const
inline

◆ num_col_dof()

size_t ug::LocalMatrix::num_col_dof ( size_t  fct) const
inline

returns the number of dofs for the currently accessible (restricted) function

References m_CplMat, m_pColFuncMap, m_pRowFuncMap, and ug::VariableArray2< T, T_ordering >::num_cols().

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

◆ num_col_fct()

size_t ug::LocalMatrix::num_col_fct ( ) const
inline

returns the number of currently accessible (restricted) functions

References m_CplMatAcc, m_pColFuncMap, ug::VariableArray2< T, T_ordering >::num_cols(), and ug::FunctionIndexMapping::num_fct().

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

◆ num_row_dof()

size_t ug::LocalMatrix::num_row_dof ( size_t  fct) const
inline

returns the number of dofs for the currently accessible (restricted) function

References m_CplMat, m_pRowFuncMap, and ug::VariableArray2< T, T_ordering >::num_rows().

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

◆ num_row_fct()

size_t ug::LocalMatrix::num_row_fct ( ) const
inline

returns the number of currently accessible (restricted) functions

References m_CplMatAcc, m_pRowFuncMap, ug::FunctionIndexMapping::num_fct(), and ug::VariableArray2< T, T_ordering >::num_rows().

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

◆ operator()() [1/2]

number& ug::LocalMatrix::operator() ( size_t  rowFct,
size_t  rowDoF,
size_t  colFct,
size_t  colDoF 
)
inline

access to (restricted) coupling (rowFct, rowDoF) x (colFct, colDoF)

References check_dof(), and m_CplMatAcc.

◆ operator()() [2/2]

number ug::LocalMatrix::operator() ( size_t  rowFct,
size_t  rowDoF,
size_t  colFct,
size_t  colDoF 
) const
inline

const access to (restricted) coupling (rowFct, rowDoF) x (colFct, colDoF)

References check_dof(), and m_CplMatAcc.

◆ operator*()

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

multiply all entries

References operator*=().

◆ operator*=()

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

◆ operator+=()

◆ operator-=()

◆ operator=()

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

◆ resize() [1/2]

◆ resize() [2/2]

◆ scale_append()

◆ value() [1/2]

number& ug::LocalMatrix::value ( size_t  rowFct,
size_t  rowDoF,
size_t  colFct,
size_t  colDoF 
)
inline

access to coupling (rowFct, rowDoF) x (colFct, colDoF)

References check_all_dof(), and m_CplMat.

Referenced by ug::LocalToGlobalMapperNLGS< TAlgebra >::add_local_mat_to_global(), and ug::AddLocalMatrixToGlobal().

◆ value() [2/2]

number ug::LocalMatrix::value ( size_t  rowFct,
size_t  rowDoF,
size_t  colFct,
size_t  colDoF 
) const
inline

const access to coupling (rowFct, rowDoF) x (colFct, colDoF)

References check_all_dof(), and m_CplMat.

Member Data Documentation

◆ m_CplMat

◆ m_CplMatAcc

FctCplAccMatrix ug::LocalMatrix::m_CplMatAcc
protected

◆ m_pColFuncMap

const FunctionIndexMapping* ug::LocalMatrix::m_pColFuncMap
protected

Column Access Mapping.

Referenced by access_all(), access_by_map(), num_col_dof(), and num_col_fct().

◆ m_pColIndex

const LocalIndices* ug::LocalMatrix::m_pColIndex
protected

◆ m_pRowFuncMap

const FunctionIndexMapping* ug::LocalMatrix::m_pRowFuncMap
protected

Row Access Mapping.

Referenced by access_all(), access_by_map(), num_col_dof(), num_row_dof(), and num_row_fct().

◆ m_pRowIndex

const LocalIndices* ug::LocalMatrix::m_pRowIndex
protected

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