#include <getmatrix.h>
|
| | Matrix (int nrows, int ncols) |
| |
| | Matrix (Matrix const &)=default |
| |
| virtual | ~Matrix () |
| |
| bool | isSquare () const |
| |
| int | Nrows () const |
| |
| int | Ncols () const |
| |
| virtual void | Debug () const =0 |
| |
| virtual void | GetDiag (std::vector< double > &d) const =0 |
| |
| std::vector< double > const & | GetDiag () const |
| |
| virtual void | Mult (std::vector< double > &w, std::vector< double > const &u) const =0 |
| |
| virtual void | Defect (std::vector< double > &w, std::vector< double > const &f, std::vector< double > const &u) const =0 |
| |
| virtual int | fetch (int row, int col) const =0 |
| |
|
| int | _nrows |
| | number of rows in matrix
|
| |
| int | _ncols |
| | number of columns in matrix
|
| |
| std::vector< double > | _dd |
| | diagonal matrix elements
|
| |
Abstract matrix class.
Definition at line 11 of file getmatrix.h.
◆ Matrix() [1/2]
| Matrix::Matrix |
( |
int |
nrows, |
|
|
int |
ncols |
|
) |
| |
Constructor for abstract matrix class.
No memory is allocated.
- Parameters
-
| [in] | nrows | number of matrix rows. |
| [in] | ncols | number of matrix columns. |
Definition at line 17 of file getmatrix.cpp.
◆ Matrix() [2/2]
| Matrix::Matrix |
( |
Matrix const & |
| ) |
|
|
default |
◆ ~Matrix()
Destructor.
No memory is allocated.
Definition at line 26 of file getmatrix.cpp.
◆ Debug()
| virtual void Matrix::Debug |
( |
| ) |
const |
|
pure virtual |
◆ Defect()
| virtual void Matrix::Defect |
( |
std::vector< double > & |
w, |
|
|
std::vector< double > const & |
f, |
|
|
std::vector< double > const & |
u |
|
) |
| const |
|
pure virtual |
Calculates the defect/residuum w := f - K*u.
- Parameters
-
| [in,out] | w | resulting vector (preallocated) |
| [in] | f | load vector |
| [in] | u | vector |
Implemented in CRS_Matrix, and BisectInterpolation.
◆ fetch()
| virtual int Matrix::fetch |
( |
int |
row, |
|
|
int |
col |
|
) |
| const |
|
pure virtual |
Finds in a CRS matrix the access index for an entry at row row and column col.
- Parameters
-
| [in] | row | row index |
| [in] | col | column index |
- Returns
- index for element (
row, col). If no appropriate entry exists then -1 will be returned.
- Warning
- assert() stops the function in case that matrix element (
row, col) doesn't exist.
Implemented in CRS_Matrix, and BisectInterpolation.
◆ GetDiag() [1/2]
| std::vector< double > const & Matrix::GetDiag |
( |
| ) |
const |
|
inline |
Extracts the diagonal elements of the matrix.
- Returns
- d vector of diagonal elements
Definition at line 78 of file getmatrix.h.
◆ GetDiag() [2/2]
| virtual void Matrix::GetDiag |
( |
std::vector< double > & |
d | ) |
const |
|
pure virtual |
Extracts the diagonal elements of an inherited matrix.
- Parameters
-
| [in,out] | d | (prellocated) vector of diagonal elements |
Implemented in CRS_Matrix, and BisectInterpolation.
◆ isSquare()
| bool Matrix::isSquare |
( |
| ) |
const |
|
inline |
Checks whether the matrix is a square matrix.
- Returns
- True iff square matrix.
Definition at line 38 of file getmatrix.h.
◆ Mult()
| virtual void Matrix::Mult |
( |
std::vector< double > & |
w, |
|
|
std::vector< double > const & |
u |
|
) |
| const |
|
pure virtual |
Performs the matrix-vector product w := K*u.
- Parameters
-
| [in,out] | w | resulting vector (preallocated) |
| [in] | u | vector |
Implemented in CRS_Matrix, and BisectInterpolation.
◆ Ncols()
| int Matrix::Ncols |
( |
| ) |
const |
|
inline |
Number of columns in matrix.
- Returns
- number of columns.
Definition at line 56 of file getmatrix.h.
◆ Nrows()
| int Matrix::Nrows |
( |
| ) |
const |
|
inline |
Number of rows in matrix.
- Returns
- number of rows.
Definition at line 47 of file getmatrix.h.
◆ _dd
| std::vector<double> Matrix::_dd |
|
mutableprotected |
◆ _ncols
number of columns in matrix
Definition at line 121 of file getmatrix.h.
◆ _nrows
The documentation for this class was generated from the following files: