Memosa-FVM  0.2
CRMatrixRect< T_Coeff, X, B >::PairWiseAssembler Class Reference

#include <CRMatrixRect.h>

Collaboration diagram for CRMatrixRect< T_Coeff, X, B >::PairWiseAssembler:

Public Member Functions

 PairWiseAssembler (Array< OffDiag > &coeffs, const Array< Vector< int, 2 > > &pairToCol)
 
OffDiaggetCoeff01 (const int np)
 
OffDiaggetCoeff10 (const int np)
 
void addCoeffsSymmetric (const int np, const OffDiag &c)
 
void addCoeffs (const int np, const OffDiag &c01, const OffDiag &c10)
 
void addCoeff01 (const int np, const OffDiag &c01)
 
void addCoeff10 (const int np, const OffDiag &c10)
 

Private Attributes

Array< OffDiag > & _coeffs
 
const Array< Vector< int, 2 > > & _pairToCol
 

Detailed Description

template<class T_Coeff, class X, class B>
class CRMatrixRect< T_Coeff, X, B >::PairWiseAssembler

Embedded class used for easy (ie. no search) access to matrix entries for the special case of face based finite volume discretizations. Works in conjunction with a pairwise access mapping provided by CRConnectivity

Definition at line 47 of file CRMatrixRect.h.

Constructor & Destructor Documentation

template<class T_Coeff , class X , class B >
CRMatrixRect< T_Coeff, X, B >::PairWiseAssembler::PairWiseAssembler ( Array< OffDiag > &  coeffs,
const Array< Vector< int, 2 > > &  pairToCol 
)
inline

Definition at line 50 of file CRMatrixRect.h.

51  :
52  _coeffs(coeffs),
53  _pairToCol(pairToCol)
54  {}
Array< OffDiag > & _coeffs
Definition: CRMatrixRect.h:88
const Array< Vector< int, 2 > > & _pairToCol
Definition: CRMatrixRect.h:89

Member Function Documentation

template<class T_Coeff , class X , class B >
void CRMatrixRect< T_Coeff, X, B >::PairWiseAssembler::addCoeff01 ( const int  np,
const OffDiag c01 
)
inline

Definition at line 78 of file CRMatrixRect.h.

References CRMatrixRect< T_Coeff, X, B >::PairWiseAssembler::_coeffs, and CRMatrixRect< T_Coeff, X, B >::PairWiseAssembler::_pairToCol.

79  {
80  _coeffs[_pairToCol[np][0]] += c01;
81  }
Array< OffDiag > & _coeffs
Definition: CRMatrixRect.h:88
const Array< Vector< int, 2 > > & _pairToCol
Definition: CRMatrixRect.h:89
template<class T_Coeff , class X , class B >
void CRMatrixRect< T_Coeff, X, B >::PairWiseAssembler::addCoeff10 ( const int  np,
const OffDiag c10 
)
inline

Definition at line 83 of file CRMatrixRect.h.

References CRMatrixRect< T_Coeff, X, B >::PairWiseAssembler::_coeffs, and CRMatrixRect< T_Coeff, X, B >::PairWiseAssembler::_pairToCol.

84  {
85  _coeffs[_pairToCol[np][1]] += c10;
86  }
Array< OffDiag > & _coeffs
Definition: CRMatrixRect.h:88
const Array< Vector< int, 2 > > & _pairToCol
Definition: CRMatrixRect.h:89
template<class T_Coeff , class X , class B >
void CRMatrixRect< T_Coeff, X, B >::PairWiseAssembler::addCoeffs ( const int  np,
const OffDiag c01,
const OffDiag c10 
)
inline

Definition at line 72 of file CRMatrixRect.h.

References CRMatrixRect< T_Coeff, X, B >::PairWiseAssembler::_coeffs, and CRMatrixRect< T_Coeff, X, B >::PairWiseAssembler::_pairToCol.

73  {
74  _coeffs[_pairToCol[np][0]] += c01;
75  _coeffs[_pairToCol[np][1]] += c10;
76  }
Array< OffDiag > & _coeffs
Definition: CRMatrixRect.h:88
const Array< Vector< int, 2 > > & _pairToCol
Definition: CRMatrixRect.h:89
template<class T_Coeff , class X , class B >
void CRMatrixRect< T_Coeff, X, B >::PairWiseAssembler::addCoeffsSymmetric ( const int  np,
const OffDiag c 
)
inline

Definition at line 66 of file CRMatrixRect.h.

References CRMatrixRect< T_Coeff, X, B >::PairWiseAssembler::_coeffs, and CRMatrixRect< T_Coeff, X, B >::PairWiseAssembler::_pairToCol.

67  {
68  _coeffs[_pairToCol[np][0]] += c;
69  _coeffs[_pairToCol[np][1]] += c;
70  }
Array< OffDiag > & _coeffs
Definition: CRMatrixRect.h:88
const Array< Vector< int, 2 > > & _pairToCol
Definition: CRMatrixRect.h:89
template<class T_Coeff , class X , class B >
OffDiag& CRMatrixRect< T_Coeff, X, B >::PairWiseAssembler::getCoeff01 ( const int  np)
inline

Definition at line 56 of file CRMatrixRect.h.

References CRMatrixRect< T_Coeff, X, B >::PairWiseAssembler::_coeffs, and CRMatrixRect< T_Coeff, X, B >::PairWiseAssembler::_pairToCol.

57  {
58  return _coeffs[_pairToCol[np][0]];
59  }
Array< OffDiag > & _coeffs
Definition: CRMatrixRect.h:88
const Array< Vector< int, 2 > > & _pairToCol
Definition: CRMatrixRect.h:89
template<class T_Coeff , class X , class B >
OffDiag& CRMatrixRect< T_Coeff, X, B >::PairWiseAssembler::getCoeff10 ( const int  np)
inline

Definition at line 61 of file CRMatrixRect.h.

References CRMatrixRect< T_Coeff, X, B >::PairWiseAssembler::_coeffs, and CRMatrixRect< T_Coeff, X, B >::PairWiseAssembler::_pairToCol.

62  {
63  return _coeffs[_pairToCol[np][1]];
64  }
Array< OffDiag > & _coeffs
Definition: CRMatrixRect.h:88
const Array< Vector< int, 2 > > & _pairToCol
Definition: CRMatrixRect.h:89

Member Data Documentation


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