SNESSetNGS#
Sets the user nonlinear Gauss-Seidel routine for use with composed nonlinear solvers.
Synopsis#
#include "petscsnes.h"
PetscErrorCode SNESSetNGS(SNES snes, PetscErrorCode (*f)(SNES snes, Vec X, Vec B, void *ctx), void *ctx)
Input Parameters#
snes - the
SNEScontextf - function evaluation routine to apply Gauss-Seidel
ctx - [optional] user-defined context for private data for the smoother evaluation routine (may be
NULL)
Calling sequence of f#
snes - the
SNEScontextX - the current solution
B - the right hand side vector (which may be
NULL)ctx - a user provided context
Note#
The SNESNGS routines are used by the composed nonlinear solver to generate
a problem appropriate update to the solution, particularly SNESFAS.
See Also#
SNES: Nonlinear Solvers, SNESGetNGS(), SNESNCG, SNESGetFunction(), SNESComputeNGS()
Level#
intermediate
Location#
Examples#
src/snes/tutorials/ex55.c
src/snes/tutorials/ex5.c
src/snes/tutorials/ex16.c
src/snes/tutorials/ex19.c
src/snes/tutorials/ex15.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages