Memosa-FVM
0.2
|
#include <CRMatrixRect.h>
Classes | |
class | PairWiseAssembler |
Public Types | |
typedef T_Coeff | Coeff |
typedef T_Coeff | Diag |
typedef T_Coeff | OffDiag |
typedef Array< Coeff > | CoeffArray |
typedef Array< Coeff > | DiagArray |
typedef Array< X > | XArray |
typedef Array< B > | BArray |
typedef map< const CRConnectivity *, PairWiseAssembler * > | PairWiseAssemblerMap |
Public Member Functions | |
CRMatrixRect (const CRConnectivity &conn) | |
DEFINE_TYPENAME ("CRMatrixRect<"+NumTypeTraits< Coeff >::getTypeName()+","+NumTypeTraits< X >::getTypeName()+","+NumTypeTraits< B >::getTypeName()+">") | |
virtual void | initAssembly () |
virtual void | multiply (IContainer &yB, const IContainer &xB) const |
virtual void | multiplyAndAdd (IContainer &yB, const IContainer &xB) const |
const CRConnectivity & | getConnectivity () const |
Array< Coeff > & | getDiag () |
Array< Coeff > & | getOffDiag () |
const Array< Coeff > & | getDiag () const |
const Array< Coeff > & | getOffDiag () const |
virtual | ~CRMatrixRect () |
shared_ptr< CRConnectivity > | createCoarseConnectivity (const IContainer &gCoarseIndex, const CRConnectivity &coarseToFine, const StorageSite &coarseRowSite, const StorageSite &coarseColSite) |
virtual shared_ptr< Matrix > | createCoarseMatrix (const IContainer &gCoarseIndex, const CRConnectivity &coarseToFine, const CRConnectivity &coarseConnectivity) |
PairWiseAssembler & | getPairWiseAssembler (const CRConnectivity &pairs) |
![]() | |
Matrix () | |
virtual | ~Matrix () |
DEFINE_TYPENAME ("Matrix") | |
virtual shared_ptr< ArrayBase > | quadProduct (const IContainer &xB) const |
virtual void | forwardGS (IContainer &xB, IContainer &bB, IContainer &residual) const |
virtual void | reverseGS (IContainer &xB, IContainer &bB, IContainer &residual) const |
virtual void | Jacobi (IContainer &xnew, const IContainer &xold, const IContainer &b) const |
virtual void | iluSolve (IContainer &xB, const IContainer &bB, const IContainer &residual) const |
virtual void | spikeSolve (IContainer &xB, const IContainer &bB, const IContainer &residual, const SpikeStorage &spike_storage) const |
virtual void | solveBoundary (IContainer &xB, IContainer &bB, IContainer &residual) const |
virtual void | computeResidual (const IContainer &xB, const IContainer &bB, IContainer &residual) const |
virtual int | createCoarsening (IContainer &coarseIndex, const int groupSize, const double weighRatioThreshold) |
virtual void | eliminateBoundaryEquations (IContainer &xB) |
virtual void | printRow (const int nr) const |
virtual void * | getDiagData () const |
virtual void * | getOffDiagData () const |
virtual int | getDiagDataSize () const |
virtual int | getOffDiagDataSize () const |
virtual shared_ptr< Matrix > | createMergeMatrix (const LinearSystemMerger &mergeLS) |
virtual void | setFlatMatrix (Matrix &fmg) const |
virtual void | transpose () |
virtual bool | isInvertible () |
Private Attributes | |
const CRConnectivity & | _conn |
const Array< int > & | _row |
const Array< int > & | _col |
Array< Coeff > | _diag |
Array< Coeff > | _offDiag |
PairWiseAssemblerMap | _pairWiseAssemblers |
Sparse matrix stored using a compressed row format. The sparsity pattern is provided by a CRConnectivity object that is required at construction time. Note that we assume that diagonal is implicitly always present (i.e., col[row[i]] through col[row[i+1]] do not contain i) and store diagonal and off diagonal entries in separate arrays.
The class is templated with the types of diagonal, off-diagonal and the corresponsing x arrays as template parameters.
Definition at line 28 of file CRMatrixRect.h.
typedef Array<B> CRMatrixRect< T_Coeff, X, B >::BArray |
Definition at line 37 of file CRMatrixRect.h.
typedef T_Coeff CRMatrixRect< T_Coeff, X, B >::Coeff |
Definition at line 31 of file CRMatrixRect.h.
typedef Array<Coeff> CRMatrixRect< T_Coeff, X, B >::CoeffArray |
Definition at line 34 of file CRMatrixRect.h.
typedef T_Coeff CRMatrixRect< T_Coeff, X, B >::Diag |
Definition at line 32 of file CRMatrixRect.h.
typedef Array<Coeff> CRMatrixRect< T_Coeff, X, B >::DiagArray |
Definition at line 35 of file CRMatrixRect.h.
typedef T_Coeff CRMatrixRect< T_Coeff, X, B >::OffDiag |
Definition at line 33 of file CRMatrixRect.h.
typedef map<const CRConnectivity*,PairWiseAssembler*> CRMatrixRect< T_Coeff, X, B >::PairWiseAssemblerMap |
Definition at line 92 of file CRMatrixRect.h.
typedef Array<X> CRMatrixRect< T_Coeff, X, B >::XArray |
Definition at line 36 of file CRMatrixRect.h.
|
inline |
Definition at line 95 of file CRMatrixRect.h.
References logCtor.
Referenced by CRMatrixRect< T_Coeff, X, B >::createCoarseMatrix().
|
inlinevirtual |
Definition at line 173 of file CRMatrixRect.h.
References logDtor.
|
inlinevirtual |
Create the connectivity for a coarse level matrix given the coarsening (ie. the fine to coarse index mapping) and its transpose (ie coarse to fine mapping, provided as a CRConnectivity object)
Reimplemented from Matrix.
Definition at line 187 of file CRMatrixRect.h.
References CRMatrixRect< T_Coeff, X, B >::_col, CRMatrixRect< T_Coeff, X, B >::_row, StorageSite::getCount(), and CRConnectivity::getCount().
|
inlinevirtual |
create the coarse matrix given the coarsening and the coarse level connectivity.
Reimplemented from Matrix.
Definition at line 288 of file CRMatrixRect.h.
References CRMatrixRect< T_Coeff, X, B >::_col, CRMatrixRect< T_Coeff, X, B >::_diag, CRMatrixRect< T_Coeff, X, B >::_offDiag, CRMatrixRect< T_Coeff, X, B >::_row, CRMatrixRect< T_Coeff, X, B >::CRMatrixRect(), CRConnectivity::getCol(), CRConnectivity::getCount(), CRConnectivity::getRow(), CRConnectivity::getRowDim(), and Array< T >::zero().
CRMatrixRect< T_Coeff, X, B >::DEFINE_TYPENAME | ( | "CRMatrixRect<"+NumTypeTraits< Coeff >::getTypeName()+","+NumTypeTraits< X >::getTypeName()+","+NumTypeTraits< B >::getTypeName()+">" | ) |
|
inlinevirtual |
Reimplemented from Matrix.
Definition at line 165 of file CRMatrixRect.h.
References CRMatrixRect< T_Coeff, X, B >::_conn.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 350 of file CRMatrixRect.h.
References CRMatrixRect< T_Coeff, X, B >::_conn, CRMatrixRect< T_Coeff, X, B >::_offDiag, CRMatrixRect< T_Coeff, X, B >::_pairWiseAssemblers, and CRConnectivity::getPairToColMapping().
|
inlinevirtual |
Implements Matrix.
Definition at line 114 of file CRMatrixRect.h.
References CRMatrixRect< T_Coeff, X, B >::_diag, CRMatrixRect< T_Coeff, X, B >::_offDiag, and Array< T >::zero().
|
inlinevirtual |
y = this * x
Reimplemented from Matrix.
Definition at line 125 of file CRMatrixRect.h.
References CRMatrixRect< T_Coeff, X, B >::_col, CRMatrixRect< T_Coeff, X, B >::_conn, CRMatrixRect< T_Coeff, X, B >::_diag, CRMatrixRect< T_Coeff, X, B >::_offDiag, CRMatrixRect< T_Coeff, X, B >::_row, CRConnectivity::getRowSite(), and StorageSite::getSelfCount().
|
inlinevirtual |
y += this * x
Reimplemented from Matrix.
Definition at line 147 of file CRMatrixRect.h.
References CRMatrixRect< T_Coeff, X, B >::_col, CRMatrixRect< T_Coeff, X, B >::_conn, CRMatrixRect< T_Coeff, X, B >::_diag, CRMatrixRect< T_Coeff, X, B >::_offDiag, CRMatrixRect< T_Coeff, X, B >::_row, CRConnectivity::getRowSite(), and StorageSite::getSelfCount().
|
private |
Definition at line 365 of file CRMatrixRect.h.
Referenced by CRMatrixRect< T_Coeff, X, B >::createCoarseConnectivity(), CRMatrixRect< T_Coeff, X, B >::createCoarseMatrix(), CRMatrixRect< T_Coeff, X, B >::multiply(), and CRMatrixRect< T_Coeff, X, B >::multiplyAndAdd().
|
private |
Definition at line 363 of file CRMatrixRect.h.
Referenced by CRMatrixRect< T_Coeff, X, B >::getConnectivity(), CRMatrixRect< T_Coeff, X, B >::getPairWiseAssembler(), CRMatrixRect< T_Coeff, X, B >::multiply(), and CRMatrixRect< T_Coeff, X, B >::multiplyAndAdd().
|
private |
|
private |
Definition at line 367 of file CRMatrixRect.h.
Referenced by CRMatrixRect< T_Coeff, X, B >::createCoarseMatrix(), CRMatrixRect< T_Coeff, X, B >::getOffDiag(), CRMatrixRect< T_Coeff, X, B >::getPairWiseAssembler(), CRMatrixRect< T_Coeff, X, B >::initAssembly(), CRMatrixRect< T_Coeff, X, B >::multiply(), and CRMatrixRect< T_Coeff, X, B >::multiplyAndAdd().
|
private |
Definition at line 368 of file CRMatrixRect.h.
Referenced by CRMatrixRect< T_Coeff, X, B >::getPairWiseAssembler().
|
private |
Definition at line 364 of file CRMatrixRect.h.
Referenced by CRMatrixRect< T_Coeff, X, B >::createCoarseConnectivity(), CRMatrixRect< T_Coeff, X, B >::createCoarseMatrix(), CRMatrixRect< T_Coeff, X, B >::multiply(), and CRMatrixRect< T_Coeff, X, B >::multiplyAndAdd().