petsc-3.7.1 2016-05-15
Report Typos and Errors

MatSOR

Computes relaxation (SOR, Gauss-Seidel) sweeps.

Synopsis

#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 and Vec Many br

Input Parameters

mat - the matrix Many br
b - the right hand side Many br
omega - the relaxation factor Many br
flag - flag indicating the type of SOR (see below) Many br
shift - diagonal shift Many br
its - the number of iterations Many br
lits - the number of local iterations Many br

Output Parameters

x -the solution (can contain an initial guess, use option SOR_ZERO_INITIAL_GUESS to indicate no guess) Many br

SOR Flags

SOR_FORWARD_SWEEP -forward SOR Many br
SOR_BACKWARD_SWEEP -backward SOR Many br
SOR_SYMMETRIC_SWEEP -SSOR (symmetric SOR) Many br
SOR_LOCAL_FORWARD_SWEEP -local forward SOR Many br
SOR_LOCAL_BACKWARD_SWEEP -local forward SOR Many br
SOR_LOCAL_SYMMETRIC_SWEEP -local SSOR Many br
SOR_APPLY_UPPER, SOR_APPLY_LOWER -applies Many brupper/lower triangular part of matrix to Many brvector (with omega) Many br
SOR_ZERO_INITIAL_GUESS -zero initial guess Many br

Notes

SOR_LOCAL_FORWARD_SWEEP, SOR_LOCAL_BACKWARD_SWEEP, and Many brSOR_LOCAL_SYMMETRIC_SWEEP perform separate independent smoothings Many bron each processor. Many br

Application programmers will not generally use MatSOR() directly, Many brbut instead will employ the KSP/PC interface. Many br

Notes: for BAIJ, SBAIJ, and AIJ matrices with Inodes this does a block SOR smoothing, otherwise it does a pointwise smoothing Many br

Notes for Advanced Users

The flags are implemented as bitwise inclusive or operations. Many brFor example, use (SOR_ZERO_INITIAL_GUESS | SOR_SYMMETRIC_SWEEP) Many brto specify a zero initial guess for SSOR. Many br

Most users should employ the simplified KSP interface for linear solvers Many brinstead of working directly with matrix algebra routines such as this. Many brSee, e.g., KSPCreate(). Many br

Vectors x and b CANNOT be the same Many br

Developer Note: We should add block SOR support for AIJ matrices with block size set to great than one and no inodes Many br

Many br

Level:developer
Location:
src/mat/interface/matrix.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/tao/pde_constrained/examples/tutorials/parabolic.c.html
src/tao/pde_constrained/examples/tutorials/hyperbolic.c.html