dune-fem
2.4.1-rc
|
#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/operator/matrix/spmatrix.hh>
Public Types | |
enum | { defaultCol = -1 } |
enum | { firstCol = defaultCol + 1 } |
typedef T | Ttype |
typedef SparseRowMatrix< T > | ThisType |
remember the value type More... | |
typedef ThisType | MatrixBaseType |
type of the base matrix (for consistency with ISTLMatrixObject) More... | |
Public Member Functions | |
SparseRowMatrix (const SparseRowMatrix< T > &S)=delete | |
SparseRowMatrix (double omega=1.1) | |
makes Matrix of zero length, omega is 1.1 by default More... | |
SparseRowMatrix (int rows, int cols, int nz, const T &val=0, double omega=1.1) | |
void | reserve (int rows, int cols, int nz, const T &dummy) |
void | resize (int newSize) |
resize keeping old values if possible, assuming rows == cols More... | |
void | resize (int newRow, int newCol, int newNz=-1) |
resize keeping old values if possible More... | |
~SparseRowMatrix () | |
free memory for values_ and col_ More... | |
int | numberOfValues () const |
length of array used to store matrix More... | |
T & | val (int i) |
matrix value taken from real array More... | |
const T & | val (int i) const |
return reference to value on given entry More... | |
T | popValue (int i) |
return value and clear matrix entry More... | |
int | realCol (int row, int fakeCol) const |
return real column number for (row,localCol) More... | |
std::pair< T, int > | realValue (int row, int fakeCol) |
return pair< value, column >, used by BlockMatrix More... | |
std::pair< const T, int > | realValue (int row, int fakeCol) const |
return pair< value, column >, used by BlockMatrix More... | |
std::pair< T, int > | realValue (int index) |
return pair< value, column >, used by BlockMatrix More... | |
std::pair< const T, int > | realValue (int index) const |
return pair< value, column >, used by BlockMatrix More... | |
int | colIndex (int row, int col) |
returns local col index for given global (row,col) More... | |
bool | find (int row, int col) const |
returns true if entry (row,col) exists in matrix More... | |
int | dim (int i) const |
return number of rows = 0, cols = 1 More... | |
int | size (int i) const |
return number of rows = 0, cols = 1 More... | |
int | rows () const |
return number of rows More... | |
int | cols () const |
return number of columns More... | |
int | numNonZeros () const |
return max number of non zeros More... | |
int | numNonZeros (int i) const |
return number of non zeros in row More... | |
T | operator() (const int row, const int col) const |
return value of entry (row,col) More... | |
T | operator() (const unsigned int row, const unsigned int col) const |
T | operator() (const long unsigned int row, const long unsigned int col) const |
void | set (int row, int col, T val) |
void | clearRow (int row) |
set all entries in row to zero More... | |
void | clearCol (int col) |
ser all entris in column col to zero More... | |
void | scaleRow (int row, const T &val) |
set all entries in row to zero More... | |
void | clear () |
void | add (int row, int col, T val) |
add value to row,col entry More... | |
void | multScalar (int row, int col, T val) |
muliply with scalar value More... | |
void | kroneckerKill (int row, int col) |
make unitRow(row) and unitCol(col) More... | |
template<class VECtype > | |
void | mult (const VECtype *x, VECtype *ret) const |
same as apply A * x = ret More... | |
template<class VECtype > | |
T | multOEMRow (const VECtype *x, const int row) const |
same as apply A * x = ret, used by OEM-Solvers More... | |
template<class VECtype > | |
void | multOEM (const VECtype *x, VECtype *ret) const |
same as apply A * x = ret, used by OEM-Solvers More... | |
template<class VECtype > | |
void | multOEMAdd (const VECtype *x, VECtype *ret) const |
calculates ret += A * x More... | |
template<class VECtype > | |
void | multOEM_t (const VECtype *x, VECtype *ret) const |
same as apply A^T * x = ret, used by OEM-Solvers More... | |
template<class DiscFType , class DiscFuncType > | |
void | apply (const DiscFType &f, DiscFuncType &ret) const |
A(f) = ret, same as mult. More... | |
template<class ArgDFType , class DestDFType > | |
void | apply_t (const ArgDFType &f, DestDFType &ret) const |
A^T(f) = ret. More... | |
template<class DiscFuncType > | |
void | operator() (const DiscFuncType &f, DiscFuncType &ret) const |
A(f) = ret. More... | |
template<class DiscFuncType > | |
void | getDiag (const ThisType &A, const ThisType &B, DiscFuncType &rhs) const |
return diagonal of (this * A * B) More... | |
template<class DiscFuncType > | |
void | getDiag (const ThisType &A, DiscFuncType &rhs) const |
return diagonal of (this * A) More... | |
template<class DiscFuncType > | |
void | getDiag (DiscFuncType &rhs) const |
return diagonal entries of this matrix More... | |
template<class DiscFuncType > | |
void | addDiag (DiscFuncType &rhs) const |
add diagonal to given DiscreteFunction More... | |
void | print (std::ostream &s, unsigned int offset=0) const |
print matrix More... | |
void | printReal (std::ostream &s) const |
print values More... | |
void | printColumns (std::ostream &s) const |
print columns More... | |
void | printNonZeros (std::ostream &s) const |
bool | checkConsistency () const |
void | unitRow (int row) |
make row a row with 1 on diagonal and all other entries 0 More... | |
void | unitCol (int col) |
make column a column with 1 on diagonal and all other entries 0 More... | |
void | checkSym () |
check symetry More... | |
void | multiply (const ThisType &B, ThisType &res) const |
void | scale (const T &factor) |
multiply this matrix with scalar More... | |
void | add (const ThisType &B) |
add other matrix to this matrix More... | |
void | resort () |
resort to have ascending column numbering More... | |
void | resortRow (const int row) |
resort row to have ascending column numbering More... | |
void | ssorPrecondition (const T *, T *) const |
SSOR preconditioning. More... | |
bool | rightPrecondition () const |
returns true if preconditioing is called before matrix multiply More... | |
void | precondition (const T *u, T *x) const |
apply preconditioning, calls ssorPreconditioning at the moment More... | |
void | solveUMF (const T *b, T *x) |
void | solveUMFNonSymmetric (const T *b, T *x) |
template<class ArgDFType , class DestDFType > | |
void | apply (const ArgDFType &f, DestDFType &ret) const |
Protected Attributes | |
T * | values_ |
int * | col_ |
data values (nz_ * dim_[0] elements) More... | |
int * | nonZeros_ |
row_ptr (dim_[0]+1 elements) More... | |
int | dim_ [2] |
row_ptr (dim_[0]+1 elements) More... | |
int | nz_ |
dim_[0] x dim_[1] Matrix More... | |
int | memSize_ |
number of nonzeros per row More... | |
bool | sorted_ |
std::vector< int > | newIndices_ |
std::vector< T > | newValues_ |
const double | omega_ |
Compressed row sparse matrix, where only the nonzeros of a row are keeped (except if you "set" a single element explicitly with the value 0, which is not forbidden and an element entry is created)
typedef ThisType Dune::Fem::SparseRowMatrix< T >::MatrixBaseType |
type of the base matrix (for consistency with ISTLMatrixObject)
typedef SparseRowMatrix<T> Dune::Fem::SparseRowMatrix< T >::ThisType |
remember the value type
typedef T Dune::Fem::SparseRowMatrix< T >::Ttype |
|
delete |
Dune::Fem::SparseRowMatrix< T >::SparseRowMatrix | ( | double | omega = 1.1 | ) |
makes Matrix of zero length, omega is 1.1 by default
References Dune::Fem::SparseRowMatrix< T >::checkConsistency(), Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::dim_, Dune::Fem::SparseRowMatrix< T >::memSize_, Dune::Fem::SparseRowMatrix< T >::nonZeros_, Dune::Fem::SparseRowMatrix< T >::nz_, and Dune::Fem::SparseRowMatrix< T >::values_.
Dune::Fem::SparseRowMatrix< T >::SparseRowMatrix | ( | int | rows, |
int | cols, | ||
int | nz, | ||
const T & | val = 0 , |
||
double | omega = 1.1 |
||
) |
make matrix with 'rows' rows and 'cols' columns, maximum 'nz' non zero values in each row and intialize all values with 'val' and set omega_ to omega
References Dune::Fem::SparseRowMatrix< T >::checkConsistency(), Dune::Fem::SparseRowMatrix< T >::clear(), Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::dim_, Dune::Fem::SparseRowMatrix< T >::memSize_, Dune::Fem::SparseRowMatrix< T >::nonZeros_, Dune::Fem::SparseRowMatrix< T >::nz_, Dune::Fem::SparseRowMatrix< T >::reserve(), and Dune::Fem::SparseRowMatrix< T >::values_.
Dune::Fem::SparseRowMatrix< T >::~SparseRowMatrix | ( | ) |
free memory for values_ and col_
References Dune::Fem::SparseRowMatrix< T >::checkConsistency(), and Dune::Fem::SparseRowMatrix< T >::reserve().
void Dune::Fem::SparseRowMatrix< T >::add | ( | int | row, |
int | col, | ||
T | val | ||
) |
add value to row,col entry
References Dune::Fem::SparseRowMatrix< T >::checkConsistency(), Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::colIndex(), Dune::Fem::SparseRowMatrix< T >::defaultCol, Dune::Fem::SparseRowMatrix< T >::nz_, Dune::Fem::SparseRowMatrix< T >::val(), and Dune::Fem::SparseRowMatrix< T >::values_.
Referenced by Dune::Fem::SparseRowMatrix< T >::multiply().
void Dune::Fem::SparseRowMatrix< T >::add | ( | const ThisType & | B | ) |
void Dune::Fem::SparseRowMatrix< T >::addDiag | ( | DiscFuncType & | rhs | ) | const |
add diagonal to given DiscreteFunction
we assume that the dimension of the functionspace of f is the same as the size of the matrix
References Dune::Fem::SparseRowMatrix< T >::size().
void Dune::Fem::SparseRowMatrix< T >::apply | ( | const DiscFType & | f, |
DiscFuncType & | ret | ||
) | const |
A(f) = ret, same as mult.
void Dune::Fem::SparseRowMatrix< T >::apply | ( | const ArgDFType & | f, |
DestDFType & | ret | ||
) | const |
we assume that the dimension of the functionspace of f is the same as the size of the matrix
DofIteratorType schould be the same
References Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::defaultCol, Dune::Fem::SparseRowMatrix< T >::dim_, Dune::Fem::SparseRowMatrix< T >::firstCol, Dune::Fem::SparseRowMatrix< T >::nz_, Dune::Fem::SparseRowMatrix< T >::realCol(), and Dune::Fem::SparseRowMatrix< T >::values_.
void Dune::Fem::SparseRowMatrix< T >::apply_t | ( | const ArgDFType & | f, |
DestDFType & | ret | ||
) | const |
A^T(f) = ret.
we assume that the dimension of the functionspace of f is the same as the size of the matrix
DofIteratorType schould be the same
References Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::defaultCol, Dune::Fem::SparseRowMatrix< T >::dim_, Dune::Fem::SparseRowMatrix< T >::firstCol, Dune::Fem::SparseRowMatrix< T >::nz_, Dune::Fem::SparseRowMatrix< T >::realCol(), and Dune::Fem::SparseRowMatrix< T >::values_.
bool Dune::Fem::SparseRowMatrix< T >::checkConsistency | ( | ) | const |
check consistency, i.e. whether number of stored nonzeros corresponds to the counters in nonZeros[] and check, whether all columns within this range have reasonable values true == consistent false == non consistent an assert(checkConsistency()) can be called at entry and exit of non-const sparsematrix operations for ensuring maintaining of consistence. This can be made conditional by the member variable checkNonConstMethods
References Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::dim_, Dune::Fem::SparseRowMatrix< T >::nonZeros_, Dune::Fem::SparseRowMatrix< T >::realCol(), and Dune::Fem::SparseRowMatrix< T >::values_.
Referenced by Dune::Fem::SparseRowMatrix< T >::add(), Dune::Fem::SparseRowMatrix< T >::checkSym(), Dune::Fem::SparseRowMatrix< T >::clear(), Dune::Fem::SparseRowMatrix< T >::clearCol(), Dune::Fem::SparseRowMatrix< T >::clearRow(), Dune::Fem::SparseRowMatrix< T >::colIndex(), Dune::Fem::SparseRowMatrix< T >::kroneckerKill(), Dune::Fem::SparseRowMatrix< T >::multScalar(), Dune::Fem::SparseRowMatrix< T >::reserve(), Dune::Fem::SparseRowMatrix< T >::resort(), Dune::Fem::SparseRowMatrix< T >::resortRow(), Dune::Fem::SparseRowMatrix< T >::scale(), Dune::Fem::SparseRowMatrix< T >::set(), Dune::Fem::SparseRowMatrix< T >::SparseRowMatrix(), Dune::Fem::SparseRowMatrix< T >::unitCol(), Dune::Fem::SparseRowMatrix< T >::unitRow(), and Dune::Fem::SparseRowMatrix< T >::~SparseRowMatrix().
void Dune::Fem::SparseRowMatrix< T >::checkSym | ( | ) |
void Dune::Fem::SparseRowMatrix< T >::clear | ( | ) |
set all matrix entries to zero, no other value makes sense for sparse matrix
References Dune::Fem::SparseRowMatrix< T >::checkConsistency(), Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::defaultCol, Dune::Fem::SparseRowMatrix< T >::dim_, Dune::Fem::SparseRowMatrix< T >::nonZeros_, Dune::Fem::SparseRowMatrix< T >::nz_, and Dune::Fem::SparseRowMatrix< T >::values_.
Referenced by Dune::Fem::SparseRowMatrix< T >::multiply(), Dune::Fem::SparseRowMatrix< T >::reserve(), and Dune::Fem::SparseRowMatrix< T >::SparseRowMatrix().
void Dune::Fem::SparseRowMatrix< T >::clearCol | ( | int | col | ) |
ser all entris in column col to zero
References Dune::Fem::SparseRowMatrix< T >::checkConsistency(), Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::dim_, Dune::Fem::SparseRowMatrix< T >::nonZeros_, and Dune::Fem::SparseRowMatrix< T >::values_.
void Dune::Fem::SparseRowMatrix< T >::clearRow | ( | int | row | ) |
set all entries in row to zero
References Dune::Fem::SparseRowMatrix< T >::checkConsistency(), Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::defaultCol, Dune::Fem::SparseRowMatrix< T >::firstCol, Dune::Fem::SparseRowMatrix< T >::nonZeros_, Dune::Fem::SparseRowMatrix< T >::nz_, and Dune::Fem::SparseRowMatrix< T >::values_.
int Dune::Fem::SparseRowMatrix< T >::colIndex | ( | int | row, |
int | col | ||
) |
returns local col index for given global (row,col)
References Dune::Fem::SparseRowMatrix< T >::checkConsistency(), Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::cols(), Dune::Fem::SparseRowMatrix< T >::defaultCol, Dune::Fem::SparseRowMatrix< T >::dim_, Dune::Fem::SparseRowMatrix< T >::nonZeros_, Dune::Fem::SparseRowMatrix< T >::nz_, Dune::Fem::SparseRowMatrix< T >::resize(), Dune::Fem::SparseRowMatrix< T >::rows(), and Dune::Fem::SparseRowMatrix< T >::values_.
Referenced by Dune::Fem::SparseRowMatrix< T >::add(), Dune::Fem::SparseRowMatrix< T >::multScalar(), and Dune::Fem::SparseRowMatrix< T >::set().
|
inline |
return number of columns
Referenced by Dune::Fem::SparseRowMatrix< T >::colIndex(), Dune::Fem::SparseRowMatrix< T >::reserve(), and Dune::ColCompMatrix< Fem::SparseRowMatrix< B > >::setMatrix().
|
inline |
return number of rows = 0, cols = 1
bool Dune::Fem::SparseRowMatrix< T >::find | ( | int | row, |
int | col | ||
) | const |
returns true if entry (row,col) exists in matrix
References Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::defaultCol, Dune::Fem::SparseRowMatrix< T >::firstCol, and Dune::Fem::SparseRowMatrix< T >::nz_.
void Dune::Fem::SparseRowMatrix< T >::getDiag | ( | const ThisType & | A, |
const ThisType & | B, | ||
DiscFuncType & | rhs | ||
) | const |
return diagonal of (this * A * B)
we assume that the dimension of the functionspace of f is the same as the size of the matrix
References Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::defaultCol, Dune::Fem::SparseRowMatrix< T >::nonZeros_, Dune::Fem::SparseRowMatrix< T >::nz_, Dune::Fem::SparseRowMatrix< T >::realCol(), Dune::Fem::SparseRowMatrix< T >::size(), Dune::Std::sum(), and Dune::Fem::SparseRowMatrix< T >::values_.
void Dune::Fem::SparseRowMatrix< T >::getDiag | ( | const ThisType & | A, |
DiscFuncType & | rhs | ||
) | const |
return diagonal of (this * A)
we assume that the dimension of the functionspace of f is the same as the size of the matrix
References Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::nz_, Dune::Fem::SparseRowMatrix< T >::realCol(), Dune::Fem::SparseRowMatrix< T >::size(), Dune::Std::sum(), and Dune::Fem::SparseRowMatrix< T >::values_.
void Dune::Fem::SparseRowMatrix< T >::getDiag | ( | DiscFuncType & | rhs | ) | const |
return diagonal entries of this matrix
we assume that the dimension of the functionspace of f is the same as the size of the matrix
References Dune::Fem::SparseRowMatrix< T >::size().
void Dune::Fem::SparseRowMatrix< T >::kroneckerKill | ( | int | row, |
int | col | ||
) |
make unitRow(row) and unitCol(col)
References Dune::Fem::SparseRowMatrix< T >::checkConsistency(), Dune::Fem::SparseRowMatrix< T >::unitCol(), and Dune::Fem::SparseRowMatrix< T >::unitRow().
void Dune::Fem::SparseRowMatrix< T >::mult | ( | const VECtype * | x, |
VECtype * | ret | ||
) | const |
same as apply A * x = ret
References Dune::Fem::SparseRowMatrix< T >::multOEM().
void Dune::Fem::SparseRowMatrix< T >::multiply | ( | const ThisType & | B, |
ThisType & | res | ||
) | const |
void Dune::Fem::SparseRowMatrix< T >::multOEM | ( | const VECtype * | x, |
VECtype * | ret | ||
) | const |
same as apply A * x = ret, used by OEM-Solvers
References Dune::Fem::SparseRowMatrix< T >::dim_, and Dune::Fem::SparseRowMatrix< T >::multOEMRow().
Referenced by Dune::Fem::SparseRowMatrix< T >::mult().
void Dune::Fem::SparseRowMatrix< T >::multOEM_t | ( | const VECtype * | x, |
VECtype * | ret | ||
) | const |
same as apply A^T * x = ret, used by OEM-Solvers
References Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::defaultCol, Dune::Fem::SparseRowMatrix< T >::dim_, Dune::Fem::SparseRowMatrix< T >::nonZeros_, Dune::Fem::SparseRowMatrix< T >::nz_, Dune::Fem::SparseRowMatrix< T >::realCol(), and Dune::Fem::SparseRowMatrix< T >::values_.
void Dune::Fem::SparseRowMatrix< T >::multOEMAdd | ( | const VECtype * | x, |
VECtype * | ret | ||
) | const |
calculates ret += A * x
References Dune::Fem::SparseRowMatrix< T >::dim_, and Dune::Fem::SparseRowMatrix< T >::multOEMRow().
T Dune::Fem::SparseRowMatrix< T >::multOEMRow | ( | const VECtype * | x, |
const int | row | ||
) | const |
same as apply A * x = ret, used by OEM-Solvers
References Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::defaultCol, Dune::Fem::SparseRowMatrix< T >::firstCol, Dune::Fem::SparseRowMatrix< T >::nonZeros_, Dune::Fem::SparseRowMatrix< T >::nz_, Dune::Fem::SparseRowMatrix< T >::realCol(), Dune::Std::sum(), and Dune::Fem::SparseRowMatrix< T >::values_.
Referenced by Dune::Fem::SparseRowMatrix< T >::multOEM(), and Dune::Fem::SparseRowMatrix< T >::multOEMAdd().
void Dune::Fem::SparseRowMatrix< T >::multScalar | ( | int | row, |
int | col, | ||
T | val | ||
) |
muliply with scalar value
References Dune::Fem::SparseRowMatrix< T >::checkConsistency(), Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::colIndex(), Dune::Fem::SparseRowMatrix< T >::defaultCol, Dune::Fem::SparseRowMatrix< T >::nz_, Dune::Fem::SparseRowMatrix< T >::val(), and Dune::Fem::SparseRowMatrix< T >::values_.
|
inline |
length of array used to store matrix
|
inline |
return max number of non zeros
Referenced by Dune::ColCompMatrix< Fem::SparseRowMatrix< B > >::setMatrix().
|
inline |
return number of non zeros in row
|
inline |
return value of entry (row,col)
References Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::dim_, Dune::Fem::SparseRowMatrix< T >::firstCol, Dune::Fem::SparseRowMatrix< T >::nonZeros_, Dune::Fem::SparseRowMatrix< T >::nz_, and Dune::Fem::SparseRowMatrix< T >::values_.
Referenced by Dune::Fem::SparseRowMatrix< T >::checkSym().
|
inline |
|
inline |
References OEMSolver::mult().
|
inline |
A(f) = ret.
References Dune::Fem::FieldMatrixHelper::multiply().
|
inline |
return value and clear matrix entry
|
inline |
apply preconditioning, calls ssorPreconditioning at the moment
void Dune::Fem::SparseRowMatrix< T >::print | ( | std::ostream & | s, |
unsigned int | offset = 0 |
||
) | const |
print matrix
References Dune::Fem::abs(), Dune::Fem::SparseRowMatrix< T >::dim_, and Dune::Fem::SparseRowMatrix< T >::val().
void Dune::Fem::SparseRowMatrix< T >::printColumns | ( | std::ostream & | s | ) | const |
print columns
References Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::dim_, and Dune::Fem::SparseRowMatrix< T >::nz_.
void Dune::Fem::SparseRowMatrix< T >::printNonZeros | ( | std::ostream & | s | ) | const |
print row-wise stored number of nonzeros No counting is performed, but the member variable nonZeros_[] is reported. So here inconsistencies can occur to the true nonzero entries in the matrix.
References Dune::Fem::SparseRowMatrix< T >::dim_, and Dune::Fem::SparseRowMatrix< T >::nonZeros_.
void Dune::Fem::SparseRowMatrix< T >::printReal | ( | std::ostream & | s | ) | const |
print values
References Dune::Fem::SparseRowMatrix< T >::dim_, Dune::Fem::SparseRowMatrix< T >::nz_, and Dune::Fem::SparseRowMatrix< T >::values_.
|
inline |
return real column number for (row,localCol)
Referenced by Dune::Fem::SparseRowMatrix< T >::apply(), Dune::Fem::SparseRowMatrix< T >::apply_t(), Dune::Fem::SparseRowMatrix< T >::checkConsistency(), Dune::Fem::SparseRowMatrix< T >::getDiag(), Dune::Fem::SparseRowMatrix< T >::multOEM_t(), Dune::Fem::SparseRowMatrix< T >::multOEMRow(), Dune::Fem::SparseRowMatrix< T >::resortRow(), and Dune::Fem::SparseRowMatrix< T >::ssorPrecondition().
|
inline |
return pair< value, column >, used by BlockMatrix
Referenced by Dune::ColCompMatrix< Fem::SparseRowMatrix< B > >::setMatrix().
|
inline |
return pair< value, column >, used by BlockMatrix
|
inline |
return pair< value, column >, used by BlockMatrix
|
inline |
return pair< value, column >, used by BlockMatrix
void Dune::Fem::SparseRowMatrix< T >::reserve | ( | int | rows, |
int | cols, | ||
int | nz, | ||
const T & | dummy | ||
) |
reserve memory for given rows, and number of non zeros, set all entries to value dummy.... What is the use of this value? only initializing with 0 makes sense, so this argument is renamed 'dummy', by the way, nothing is happening with this argument, so might be completely removed.
References Dune::Fem::SparseRowMatrix< T >::checkConsistency(), Dune::Fem::SparseRowMatrix< T >::clear(), Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::cols(), Dune::Fem::SparseRowMatrix< T >::dim_, Dune::Fem::SparseRowMatrix< T >::firstCol, Dune::Fem::SparseRowMatrix< T >::memSize_, Dune::Fem::SparseRowMatrix< T >::newIndices_, Dune::Fem::SparseRowMatrix< T >::newValues_, Dune::Fem::SparseRowMatrix< T >::nonZeros_, Dune::Fem::SparseRowMatrix< T >::nz_, Dune::Fem::SparseRowMatrix< T >::rows(), and Dune::Fem::SparseRowMatrix< T >::values_.
Referenced by Dune::Fem::SparseRowMatrix< T >::resize(), Dune::Fem::SparseRowMatrix< T >::SparseRowMatrix(), and Dune::Fem::SparseRowMatrix< T >::~SparseRowMatrix().
void Dune::Fem::SparseRowMatrix< T >::resize | ( | int | newSize | ) |
resize keeping old values if possible, assuming rows == cols
Referenced by Dune::Fem::SparseRowMatrix< T >::colIndex().
void Dune::Fem::SparseRowMatrix< T >::resize | ( | int | newRow, |
int | newCol, | ||
int | newNz = -1 |
||
) |
resize keeping old values if possible
References Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::dim_, Dune::Fem::SparseRowMatrix< T >::memSize_, Dune::Std::min(), Dune::Fem::SparseRowMatrix< T >::nonZeros_, Dune::Fem::SparseRowMatrix< T >::nz_, Dune::Fem::SparseRowMatrix< T >::reserve(), Dune::Fem::SparseRowMatrix< T >::size(), and Dune::Fem::SparseRowMatrix< T >::values_.
void Dune::Fem::SparseRowMatrix< T >::resort | ( | ) |
resort to have ascending column numbering
References Dune::Fem::SparseRowMatrix< T >::checkConsistency(), Dune::Fem::SparseRowMatrix< T >::resortRow(), and Dune::Fem::SparseRowMatrix< T >::rows().
void Dune::Fem::SparseRowMatrix< T >::resortRow | ( | const int | row | ) |
resort row to have ascending column numbering
References Dune::Fem::SparseRowMatrix< T >::checkConsistency(), Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::defaultCol, Dune::Fem::SparseRowMatrix< T >::newIndices_, Dune::Fem::SparseRowMatrix< T >::newValues_, Dune::Fem::SparseRowMatrix< T >::nonZeros_, Dune::Fem::SparseRowMatrix< T >::nz_, Dune::Fem::SparseRowMatrix< T >::realCol(), Dune::Fem::SparseRowMatrix< T >::val(), and Dune::Fem::SparseRowMatrix< T >::values_.
Referenced by Dune::Fem::SparseRowMatrix< T >::resort().
|
inline |
returns true if preconditioing is called before matrix multiply
|
inline |
return number of rows
Referenced by Dune::Fem::SparseRowMatrix< T >::colIndex(), Dune::Fem::SparseRowMatrix< T >::reserve(), Dune::Fem::SparseRowMatrix< T >::resort(), and Dune::ColCompMatrix< Fem::SparseRowMatrix< B > >::setMatrix().
void Dune::Fem::SparseRowMatrix< T >::scale | ( | const T & | factor | ) |
multiply this matrix with scalar
References Dune::Fem::SparseRowMatrix< T >::checkConsistency(), Dune::Fem::SparseRowMatrix< T >::dim_, Dune::Fem::SparseRowMatrix< T >::nz_, and Dune::Fem::SparseRowMatrix< T >::values_.
void Dune::Fem::SparseRowMatrix< T >::scaleRow | ( | int | row, |
const T & | val | ||
) |
set all entries in row to zero
References Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::nonZeros_, Dune::Fem::SparseRowMatrix< T >::nz_, Dune::Fem::SparseRowMatrix< T >::val(), and Dune::Fem::SparseRowMatrix< T >::values_.
void Dune::Fem::SparseRowMatrix< T >::set | ( | int | row, |
int | col, | ||
T | val | ||
) |
set entry to value note, that every entry is performed into the matrix! also setting of value 0 will result in an entry. So these calls should be ommited on a higher level
References Dune::Fem::SparseRowMatrix< T >::checkConsistency(), Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::colIndex(), Dune::Fem::SparseRowMatrix< T >::defaultCol, Dune::Fem::SparseRowMatrix< T >::dim_, Dune::Fem::SparseRowMatrix< T >::nonZeros_, Dune::Fem::SparseRowMatrix< T >::nz_, Dune::Fem::SparseRowMatrix< T >::val(), and Dune::Fem::SparseRowMatrix< T >::values_.
|
inline |
return number of rows = 0, cols = 1
Referenced by Dune::Fem::SparseRowMatrix< T >::add(), Dune::Fem::SparseRowMatrix< T >::addDiag(), Dune::Fem::SparseRowMatrix< T >::checkSym(), Dune::Fem::SparseRowMatrix< T >::getDiag(), Dune::Fem::SparseRowMatrix< T >::multiply(), and Dune::Fem::SparseRowMatrix< T >::resize().
void Dune::Fem::SparseRowMatrix< T >::solveUMF | ( | const T * | b, |
T * | x | ||
) |
void Dune::Fem::SparseRowMatrix< T >::solveUMFNonSymmetric | ( | const T * | b, |
T * | x | ||
) |
void Dune::Fem::SparseRowMatrix< T >::ssorPrecondition | ( | const T * | u, |
T * | x | ||
) | const |
SSOR preconditioning.
References Dune::Fem::abs(), Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::defaultCol, Dune::Fem::SparseRowMatrix< T >::dim_, Dune::Fem::SparseRowMatrix< T >::firstCol, Dune::Fem::SparseRowMatrix< T >::nonZeros_, Dune::Fem::SparseRowMatrix< T >::nz_, Dune::Fem::SparseRowMatrix< T >::omega_, Dune::Fem::SparseRowMatrix< T >::realCol(), and Dune::Fem::SparseRowMatrix< T >::values_.
void Dune::Fem::SparseRowMatrix< T >::unitCol | ( | int | col | ) |
make column a column with 1 on diagonal and all other entries 0
References Dune::Fem::SparseRowMatrix< T >::checkConsistency(), and Dune::Fem::SparseRowMatrix< T >::dim_.
Referenced by Dune::Fem::SparseRowMatrix< T >::kroneckerKill().
void Dune::Fem::SparseRowMatrix< T >::unitRow | ( | int | row | ) |
make row a row with 1 on diagonal and all other entries 0
References Dune::Fem::SparseRowMatrix< T >::checkConsistency(), Dune::Fem::SparseRowMatrix< T >::col_, Dune::Fem::SparseRowMatrix< T >::defaultCol, Dune::Fem::SparseRowMatrix< T >::dim_, Dune::Fem::SparseRowMatrix< T >::nonZeros_, Dune::Fem::SparseRowMatrix< T >::nz_, and Dune::Fem::SparseRowMatrix< T >::values_.
Referenced by Dune::Fem::SparseRowMatrix< T >::kroneckerKill().
|
inline |
matrix value taken from real array
Referenced by Dune::Fem::SparseRowMatrix< T >::add(), Dune::Fem::SparseRowMatrix< T >::checkSym(), Dune::Fem::SparseRowMatrix< T >::multScalar(), Dune::Fem::SparseRowMatrix< T >::print(), Dune::Fem::SparseRowMatrix< T >::resortRow(), Dune::Fem::SparseRowMatrix< T >::scaleRow(), and Dune::Fem::SparseRowMatrix< T >::set().
|
inline |
return reference to value on given entry
|
protected |
data values (nz_ * dim_[0] elements)
Referenced by Dune::Fem::SparseRowMatrix< T >::add(), Dune::Fem::SparseRowMatrix< T >::apply(), Dune::Fem::SparseRowMatrix< T >::apply_t(), Dune::Fem::SparseRowMatrix< T >::checkConsistency(), Dune::Fem::SparseRowMatrix< T >::clear(), Dune::Fem::SparseRowMatrix< T >::clearCol(), Dune::Fem::SparseRowMatrix< T >::clearRow(), Dune::Fem::SparseRowMatrix< T >::colIndex(), Dune::Fem::SparseRowMatrix< T >::find(), Dune::Fem::SparseRowMatrix< T >::getDiag(), Dune::Fem::SparseRowMatrix< T >::multOEM_t(), Dune::Fem::SparseRowMatrix< T >::multOEMRow(), Dune::Fem::SparseRowMatrix< T >::multScalar(), Dune::Fem::SparseRowMatrix< T >::operator()(), Dune::Fem::SparseRowMatrix< T >::printColumns(), Dune::Fem::SparseRowMatrix< T >::reserve(), Dune::Fem::SparseRowMatrix< T >::resize(), Dune::Fem::SparseRowMatrix< T >::resortRow(), Dune::Fem::SparseRowMatrix< T >::scaleRow(), Dune::Fem::SparseRowMatrix< T >::set(), Dune::Fem::SparseRowMatrix< T >::SparseRowMatrix(), Dune::Fem::SparseRowMatrix< T >::ssorPrecondition(), and Dune::Fem::SparseRowMatrix< T >::unitRow().
|
protected |
row_ptr (dim_[0]+1 elements)
Referenced by Dune::Fem::SparseRowMatrix< T >::add(), Dune::Fem::SparseRowMatrix< T >::apply(), Dune::Fem::SparseRowMatrix< T >::apply_t(), Dune::Fem::SparseRowMatrix< T >::checkConsistency(), Dune::Fem::SparseRowMatrix< T >::clear(), Dune::Fem::SparseRowMatrix< T >::clearCol(), Dune::Fem::SparseRowMatrix< T >::colIndex(), Dune::Fem::SparseRowMatrix< T >::multOEM(), Dune::Fem::SparseRowMatrix< T >::multOEM_t(), Dune::Fem::SparseRowMatrix< T >::multOEMAdd(), Dune::Fem::SparseRowMatrix< T >::operator()(), Dune::Fem::SparseRowMatrix< T >::print(), Dune::Fem::SparseRowMatrix< T >::printColumns(), Dune::Fem::SparseRowMatrix< T >::printNonZeros(), Dune::Fem::SparseRowMatrix< T >::printReal(), Dune::Fem::SparseRowMatrix< T >::reserve(), Dune::Fem::SparseRowMatrix< T >::resize(), Dune::Fem::SparseRowMatrix< T >::scale(), Dune::Fem::SparseRowMatrix< T >::set(), Dune::Fem::SparseRowMatrix< T >::SparseRowMatrix(), Dune::Fem::SparseRowMatrix< T >::ssorPrecondition(), Dune::Fem::SparseRowMatrix< T >::unitCol(), and Dune::Fem::SparseRowMatrix< T >::unitRow().
|
protected |
number of nonzeros per row
Referenced by Dune::Fem::SparseRowMatrix< T >::reserve(), Dune::Fem::SparseRowMatrix< T >::resize(), and Dune::Fem::SparseRowMatrix< T >::SparseRowMatrix().
|
protected |
|
protected |
|
protected |
row_ptr (dim_[0]+1 elements)
Referenced by Dune::Fem::SparseRowMatrix< T >::checkConsistency(), Dune::Fem::SparseRowMatrix< T >::clear(), Dune::Fem::SparseRowMatrix< T >::clearCol(), Dune::Fem::SparseRowMatrix< T >::clearRow(), Dune::Fem::SparseRowMatrix< T >::colIndex(), Dune::Fem::SparseRowMatrix< T >::getDiag(), Dune::Fem::SparseRowMatrix< T >::multOEM_t(), Dune::Fem::SparseRowMatrix< T >::multOEMRow(), Dune::Fem::SparseRowMatrix< T >::operator()(), Dune::Fem::SparseRowMatrix< T >::printNonZeros(), Dune::Fem::SparseRowMatrix< T >::reserve(), Dune::Fem::SparseRowMatrix< T >::resize(), Dune::Fem::SparseRowMatrix< T >::resortRow(), Dune::Fem::SparseRowMatrix< T >::scaleRow(), Dune::Fem::SparseRowMatrix< T >::set(), Dune::Fem::SparseRowMatrix< T >::SparseRowMatrix(), Dune::Fem::SparseRowMatrix< T >::ssorPrecondition(), and Dune::Fem::SparseRowMatrix< T >::unitRow().
|
protected |
dim_[0] x dim_[1] Matrix
Referenced by Dune::Fem::SparseRowMatrix< T >::add(), Dune::Fem::SparseRowMatrix< T >::apply(), Dune::Fem::SparseRowMatrix< T >::apply_t(), Dune::Fem::SparseRowMatrix< T >::clear(), Dune::Fem::SparseRowMatrix< T >::clearRow(), Dune::Fem::SparseRowMatrix< T >::colIndex(), Dune::Fem::SparseRowMatrix< T >::find(), Dune::Fem::SparseRowMatrix< T >::getDiag(), Dune::Fem::SparseRowMatrix< T >::multOEM_t(), Dune::Fem::SparseRowMatrix< T >::multOEMRow(), Dune::Fem::SparseRowMatrix< T >::multScalar(), Dune::Fem::SparseRowMatrix< T >::operator()(), Dune::Fem::SparseRowMatrix< T >::printColumns(), Dune::Fem::SparseRowMatrix< T >::printReal(), Dune::Fem::SparseRowMatrix< T >::reserve(), Dune::Fem::SparseRowMatrix< T >::resize(), Dune::Fem::SparseRowMatrix< T >::resortRow(), Dune::Fem::SparseRowMatrix< T >::scale(), Dune::Fem::SparseRowMatrix< T >::scaleRow(), Dune::Fem::SparseRowMatrix< T >::set(), Dune::Fem::SparseRowMatrix< T >::SparseRowMatrix(), Dune::Fem::SparseRowMatrix< T >::ssorPrecondition(), and Dune::Fem::SparseRowMatrix< T >::unitRow().
|
protected |
Referenced by Dune::Fem::SparseRowMatrix< T >::ssorPrecondition().
|
protected |
|
protected |
Referenced by Dune::Fem::SparseRowMatrix< T >::add(), Dune::Fem::SparseRowMatrix< T >::apply(), Dune::Fem::SparseRowMatrix< T >::apply_t(), Dune::Fem::SparseRowMatrix< T >::checkConsistency(), Dune::Fem::SparseRowMatrix< T >::clear(), Dune::Fem::SparseRowMatrix< T >::clearCol(), Dune::Fem::SparseRowMatrix< T >::clearRow(), Dune::Fem::SparseRowMatrix< T >::colIndex(), Dune::Fem::SparseRowMatrix< T >::getDiag(), Dune::Fem::SparseRowMatrix< T >::multOEM_t(), Dune::Fem::SparseRowMatrix< T >::multOEMRow(), Dune::Fem::SparseRowMatrix< T >::multScalar(), Dune::Fem::SparseRowMatrix< T >::operator()(), Dune::Fem::SparseRowMatrix< T >::printReal(), Dune::Fem::SparseRowMatrix< T >::reserve(), Dune::Fem::SparseRowMatrix< T >::resize(), Dune::Fem::SparseRowMatrix< T >::resortRow(), Dune::Fem::SparseRowMatrix< T >::scale(), Dune::Fem::SparseRowMatrix< T >::scaleRow(), Dune::Fem::SparseRowMatrix< T >::set(), Dune::Fem::SparseRowMatrix< T >::SparseRowMatrix(), Dune::Fem::SparseRowMatrix< T >::ssorPrecondition(), and Dune::Fem::SparseRowMatrix< T >::unitRow().