#include "petscsnes.h" #include "petscdmshell.h" #include "petscsys.h" PetscErrorCode SNESSetType(SNES snes,const SNESType type)Collective on SNES
snes | - the SNES context | |
type | - a known method |
Normally, it is best to use the SNESSetFromOptions() command and then set the SNES solver type from the options database rather than by using this routine. Using the options database provides the user with maximum flexibility in evaluating the many nonlinear solvers. The SNESSetType() routine is provided for those situations where it is necessary to set the nonlinear solver independently of the command line or options database. This might be the case, for example, when the choice of solver changes during the execution of the program, and the user's application is taking responsibility for choosing the appropriate method.
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
SNESLS | - Newton's method with line search (systems of nonlinear equations) | |
SNESTR | - Newton's method with trust region (systems of nonlinear equations) |