Memosa-FVM
0.2
|
#include <CRMatrixTranspose.h>
Public Types | |
typedef T_Coeff | Coeff |
typedef Array< Coeff > | CoeffArray |
typedef Array< X > | XArray |
typedef Array< B > | BArray |
Public Member Functions | |
CRMatrixTranspose (const CRConnectivity &conn) | |
template<class X2 , class B2 > | |
CRMatrixTranspose (const CRMatrixTranspose< Coeff, X2, B2 > &m) | |
DEFINE_TYPENAME ("CRMatrixTranspose<"+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 > & | getCoeff () |
const Array< Coeff > & | getCoeff () const |
shared_ptr< Array< Coeff > > | getCoeffPtr () const |
![]() | |
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 shared_ptr < CRConnectivity > | createCoarseConnectivity (const IContainer &coarseIndex, const CRConnectivity &coarseToFine, const StorageSite &coarseRowSite, const StorageSite &coarseColSite) |
virtual shared_ptr< Matrix > | createCoarseMatrix (const IContainer &coarseIndex, const CRConnectivity &coarseToFine, const CRConnectivity &coarseConnectivity) |
virtual bool | isInvertible () |
Private Attributes | |
const CRConnectivity & | _conn |
const Array< int > & | _row |
const Array< int > & | _col |
shared_ptr< Array< Coeff > > | _coeffPtr |
Array< Coeff > & | _coeff |
This class is similar to CRMatrix except that it stores the transpose of the matrix implied by the CRConnectivity object that is given to it. This is useful in situations like node to cell interpolation matrix where the connectivity we have is cell to nodes but the matrix we want is one which stores the weights of node to cell interpolation. In such cases we can create a matrix of this class using the cell to node connectivity but use it in a multiplication operation with the cell value array to get the node value array. It is also very useful for ib faces since storing ib face to cell (or ib face to particle) connectivity is a lot cheaper than the transpose.
The class is templated with the types of coefficient, x and b arrays as template parameters. Since the primary use of this class is for storing interpolation matrices from one site to another we have a special constructor that can create a CRMatrixTranspose object of the same Coeff type but different X and B (e.g. to interpolate vector variables). For this reason the coeff is stored as a shared_ptr.
Definition at line 41 of file CRMatrixTranspose.h.
typedef Array<B> CRMatrixTranspose< T_Coeff, X, B >::BArray |
Definition at line 47 of file CRMatrixTranspose.h.
typedef T_Coeff CRMatrixTranspose< T_Coeff, X, B >::Coeff |
Definition at line 44 of file CRMatrixTranspose.h.
typedef Array<Coeff> CRMatrixTranspose< T_Coeff, X, B >::CoeffArray |
Definition at line 45 of file CRMatrixTranspose.h.
typedef Array<X> CRMatrixTranspose< T_Coeff, X, B >::XArray |
Definition at line 46 of file CRMatrixTranspose.h.
|
inline |
Definition at line 50 of file CRMatrixTranspose.h.
References logCtor.
|
inline |
Definition at line 65 of file CRMatrixTranspose.h.
References logCtor.
CRMatrixTranspose< T_Coeff, X, B >::DEFINE_TYPENAME | ( | "CRMatrixTranspose<"+NumTypeTraits< Coeff >::getTypeName()+","+NumTypeTraits< X >::getTypeName()+","+NumTypeTraits< B >::getTypeName()+">" | ) |
|
inline |
Definition at line 123 of file CRMatrixTranspose.h.
References CRMatrixTranspose< T_Coeff, X, B >::_coeff.
|
inline |
Definition at line 124 of file CRMatrixTranspose.h.
References CRMatrixTranspose< T_Coeff, X, B >::_coeff.
|
inline |
Definition at line 125 of file CRMatrixTranspose.h.
References CRMatrixTranspose< T_Coeff, X, B >::_coeffPtr.
|
inlinevirtual |
Reimplemented from Matrix.
Definition at line 121 of file CRMatrixTranspose.h.
References CRMatrixTranspose< T_Coeff, X, B >::_conn.
|
inlinevirtual |
Implements Matrix.
Definition at line 83 of file CRMatrixTranspose.h.
References CRMatrixTranspose< T_Coeff, X, B >::_coeff, and Array< T >::zero().
|
inlinevirtual |
y = this * x
Reimplemented from Matrix.
Definition at line 93 of file CRMatrixTranspose.h.
References CRMatrixTranspose< T_Coeff, X, B >::multiplyAndAdd(), and IContainer::zero().
|
inlinevirtual |
y += this * x
Reimplemented from Matrix.
Definition at line 104 of file CRMatrixTranspose.h.
References CRMatrixTranspose< T_Coeff, X, B >::_coeff, CRMatrixTranspose< T_Coeff, X, B >::_col, CRMatrixTranspose< T_Coeff, X, B >::_conn, CRMatrixTranspose< T_Coeff, X, B >::_row, StorageSite::getCount(), and CRConnectivity::getRowSite().
Referenced by CRMatrixTranspose< T_Coeff, X, B >::multiply().
|
private |
Definition at line 132 of file CRMatrixTranspose.h.
Referenced by CRMatrixTranspose< T_Coeff, X, B >::getCoeff(), CRMatrixTranspose< T_Coeff, X, B >::initAssembly(), and CRMatrixTranspose< T_Coeff, X, B >::multiplyAndAdd().
|
private |
Definition at line 131 of file CRMatrixTranspose.h.
Referenced by CRMatrixTranspose< T_Coeff, X, B >::getCoeffPtr().
|
private |
Definition at line 130 of file CRMatrixTranspose.h.
Referenced by CRMatrixTranspose< T_Coeff, X, B >::multiplyAndAdd().
|
private |
Definition at line 128 of file CRMatrixTranspose.h.
Referenced by CRMatrixTranspose< T_Coeff, X, B >::getConnectivity(), and CRMatrixTranspose< T_Coeff, X, B >::multiplyAndAdd().
|
private |
Definition at line 129 of file CRMatrixTranspose.h.
Referenced by CRMatrixTranspose< T_Coeff, X, B >::multiplyAndAdd().