petsc-3.10.5 2019-03-28
Report Typos and Errors

SNESSetPicard

Use SNES to solve the semilinear-system A(x) x = b(x) via a Picard type iteration (Picard linearization)

Synopsis

#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

Input Parameters

snes - the SNES context
r - vector to store function value
b - function evaluation routine
Amat - matrix with which A(x) x - b(x) is to be computed
Pmat - matrix from which preconditioner is computed (usually the same as Amat)
J - function to compute matrix value, see SNESJacobianFunction for details on its calling sequence
ctx - [optional] user-defined context for private data for the function evaluation routine (may be NULL)

Notes

We do not recomemend using this routine. It is far better to provide the nonlinear function F() and some approximation to the Jacobian and use an approximate Newton solver. This interface is provided to allow porting/testing a previous Picard based code in PETSc before converting it to approximate Newton.

One can call SNESSetPicard() or SNESSetFunction() (and possibly SNESSetJacobian()) but cannot call both

    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.

We implement the defect correction form of the Picard iteration because it converges much more generally when inexact linear solvers are used then the direct Picard iteration A(x^n) x^{n+1} = b(x^n)

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 believe 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 different please contact us at [email protected] and we'll have an entirely new argument :-).

Keywords

SNES, nonlinear, set, function

See Also

SNESGetFunction(), SNESSetFunction(), SNESComputeFunction(), SNESSetJacobian(), SNESGetPicard(), SNESLineSearchPreCheckPicard(), SNESJacobianFunction

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