#include "petscsnes.h" PetscErrorCode SNESSetPicard(SNES snes,Vec r,PetscErrorCode (*b)(SNES,Vec,Vec,void*),Mat Amat, Mat Pmat, PetscErrorCode (*J)(SNES,Vec,Mat,Mat,void*),void *ctx)Logically Collective on SNES Many br
snes | - the SNES context Many br | |
r | - vector to store function value Many br | |
b | - function evaluation routine Many br | |
Amat | - matrix with which A(x) x - b(x) is to be computed Many br | |
Pmat | - matrix from which preconditioner is computed (usually the same as Amat) Many br | |
J | - function to compute matrix value, see SNESJacobianFunction for details on its calling sequence Many br | |
ctx | - [optional] user-defined context for private data for the Many brfunction evaluation routine (may be NULL) Many br |
One can call SNESSetPicard() or SNESSetFunction() (and possibly SNESSetJacobian()) but cannot call both Many br
Solves the equation A(x) x = b(x) via the defect correction algorithm A(x^{n}) (x^{n+1} - x^{n}) = b(x^{n}) - A(x^{n})x^{n}
Note that when an exact solver is used this corresponds to the "classic" Picard A(x^{n}) x^{n+1} = b(x^{n}) iteration.
Run with -snes_mf_operator to solve the system with Newton's method using A(x^{n}) to construct the preconditioner. Many br
We implement the defect correction form of the Picard iteration because it converges much more generally when inexact linear solvers are used then Many brthe direct Picard iteration A(x^n) x^{n+1} = b(x^n) Many br
There is some controversity over the definition of a Picard iteration for nonlinear systems but almost everyone agrees that it involves a linear solve and some Many brbelieve it is the iteration A(x^{n}) x^{n+1} = b(x^{n}) hence we use the name Picard. If anyone has an authoritative reference that defines the Picard iteration Many brdifferent please contact us at petsc-dev@mcs.anl.gov and we'll have an entirely new argument :-). Many br
Many br
Level:intermediate
Location:src/snes/interface/snes.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages