petsc-3.3-p7 2013-05-11

SNESSetGS

Sets the user nonlinear Gauss-Seidel routine for use with composed nonlinear solvers.

Synopsis

#include "petscsnes.h"  
#include "petscdmshell.h" 
#include "petscsys.h" 
PetscErrorCode SNESSetGS(SNES snes,PetscErrorCode (*gsfunc)(SNES,Vec,Vec,void*),void *ctx)

Input Parameters

snes - the SNES context
gsfunc - function evaluation routine
ctx - [optional] user-defined context for private data for the smoother evaluation routine (may be PETSC_NULL)

Calling sequence of func

   func (SNES snes,Vec x,Vec b,void *ctx);

X - solution vector
B - RHS vector
ctx - optional user-defined Gauss-Seidel context

Notes

The GS routines are used by the composed nonlinear solver to generate a problem appropriate update to the solution, particularly FAS.

Keywords

SNES, nonlinear, set, Gauss-Seidel

See Also

SNESGetFunction(), SNESComputeGS()

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

Examples

src/snes/examples/tutorials/ex5.c.html
src/snes/examples/tutorials/ex19.c.html