#include "petscmat.h" PetscErrorCode MatSOR(Mat mat,Vec b,PetscReal omega,MatSORType flag,PetscReal shift,PetscInt its,PetscInt lits,Vec x)Neighbor-wise Collective on Mat
| mat | - the matrix | |
| b | - the right hand side | |
| omega | - the relaxation factor | |
| flag | - flag indicating the type of SOR (see below) | |
| shift | - diagonal shift | |
| its | - the number of iterations | |
| lits | - the number of local iterations |
| x | - the solution (can contain an initial guess, use option SOR_ZERO_INITIAL_GUESS to indicate no guess) |
| SOR_FORWARD_SWEEP | - forward SOR | |
| SOR_BACKWARD_SWEEP | - backward SOR | |
| SOR_SYMMETRIC_SWEEP | - SSOR (symmetric SOR) | |
| SOR_LOCAL_FORWARD_SWEEP | - local forward SOR | |
| SOR_LOCAL_BACKWARD_SWEEP | - local forward SOR | |
| SOR_LOCAL_SYMMETRIC_SWEEP | - local SSOR | |
| SOR_APPLY_UPPER, SOR_APPLY_LOWER | - applies upper/lower triangular part of matrix to vector (with omega) | |
| SOR_ZERO_INITIAL_GUESS | - zero initial guess |
Application programmers will not generally use MatSOR() directly, but instead will employ the KSP/PC interface.
Most users should employ the simplified KSP interface for linear solvers instead of working directly with matrix algebra routines such as this. See, e.g., KSPCreate().
Vectors x and b CANNOT be the same
Developer Note: We should add block SOR support for AIJ matrices with block size set to great than one and no inodes