jacobi.template
|
** More...
#include <getmatrix.h>
Public Member Functions | |
BisectInterpolation (std::vector< int > const &fathers) | |
BisectInterpolation () | |
BisectInterpolation (BisectInterpolation const &)=default | |
~BisectInterpolation () override | |
void | GetDiag (std::vector< double > &d) const override |
void | Mult (std::vector< double > &wf, std::vector< double > const &uc) const override |
** More... | |
void | MultT (std::vector< double > const &wf, std::vector< double > &uc) const |
void | Defect (std::vector< double > &w, std::vector< double > const &f, std::vector< double > const &u) const override |
void | Debug () const override |
int | fetch (int row, int col) const override |
Public Member Functions inherited from Matrix | |
Matrix (int nrows, int ncols) | |
Matrix (Matrix const &)=default | |
virtual | ~Matrix () |
bool | isSquare () const |
int | Nrows () const |
int | Ncols () const |
const std::vector< double > & | GetDiag () const |
Protected Attributes | |
std::vector< int > | _iv |
fathers[nnode][2] of fine grid nodes, double entries denote injection points More... | |
std::vector< double > | _vv |
weights[nnode][2] of fathers for grid nodes More... | |
Protected Attributes inherited from Matrix | |
int | _nrows |
number of rows in matrix More... | |
int | _ncols |
number of columns in matrix More... | |
std::vector< double > | _dd |
diagonal matrix elements More... | |
Friends | |
void | DefectRestrict (CRS_Matrix const &SK, BisectInterpolation const &P, std::vector< double > &fc, std::vector< double > &ff, std::vector< double > &uf) |
**
** ** ** Interpolation matrix for prolongation coarse mesh (C) to a fine mesh (F) generated by bisecting edges.
All interpolation weights are 0.5 (injection points contribute twice).
Definition at line 374 of file getmatrix.h.
|
explicit |
Generates the interpolation matrix for prolongation coarse mesh to a fine mesh generated by bisecting edges. The interpolation weights are all 0.5.
[in] | fathers | vector[nnodes][2] containing the two coarse grid fathers of a fine grid vertex |
Definition at line 540 of file getmatrix.cpp.
BisectInterpolation::BisectInterpolation | ( | ) |
Definition at line 535 of file getmatrix.cpp.
|
default |
|
override |
Destructor.
Definition at line 546 of file getmatrix.cpp.
|
overridevirtual |
|
overridevirtual |
Calculates the defect/residuum w := f - P*u.
[in,out] | w | resulting vector (preallocated) |
[in] | f | load vector |
[in] | u | coarse vector |
Implements Matrix.
Definition at line 624 of file getmatrix.cpp.
|
overridevirtual |
Finds in this matrix the access index for an entry at row row
and column col
.
[in] | row | row index |
[in] | col | column index |
row
, col
). If no appropriate entry exists then -1 will be returned.row
, col
) doesn't exist. Implements Matrix.
Definition at line 649 of file getmatrix.cpp.
|
overridevirtual |
Extracts the diagonal elements of the matrix.
[in,out] | d | (prellocated) vector of diagonal elements |
Implements Matrix.
Definition at line 549 of file getmatrix.cpp.
|
overridevirtual |
**
Performs the prolongation \( w_F := P*u_C \).
[in,out] | wf | resulting fine vector (preallocated) |
[in] | uc | coarse vector |
Implements Matrix.
Definition at line 567 of file getmatrix.cpp.
void BisectInterpolation::MultT | ( | std::vector< double > const & | wf, |
std::vector< double > & | uc | ||
) | const |
Performs the restriction \( u_C := P^T*w_F \).
[in] | wf | fine vector |
[in,out] | uc | resulting coarse vector (preallocated) |
Definition at line 598 of file getmatrix.cpp.
|
friend |
Calculates the defect and projects it to the next coarser level \( f_C := P^T \cdot (f_F - SK\cdot u_F) \).
[in] | SK | matrix on fine mesh |
[in] | P | prolongation operator |
[in,out] | fc | resulting coarse mesh vector (preallocated) |
[in] | ff | r.h.s. on fine mesh |
[in] | uf | status vector on fine mesh |
|
protected |
fathers[nnode][2] of fine grid nodes, double entries denote injection points
Definition at line 465 of file getmatrix.h.
|
protected |
weights[nnode][2] of fathers for grid nodes
Definition at line 466 of file getmatrix.h.