petsc-3.13.6 2020-09-29
Report Typos and Errors

SNESShellSetSolve

Sets routine to apply as solver

Synopsis

#include "petscsnes.h"   
PetscErrorCode  SNESShellSetSolve(SNES snes,PetscErrorCode (*solve)(SNES,Vec))
Logically Collective on SNES

Input Parameters

snes - the nonlinear solver context
apply - the Section 1.5 Writing Application Codes with PETSc-provided solver routine

Calling sequence of solve

   PetscErrorCode apply (SNES snes,Vec xout)

snes - the preconditioner, get the Section 1.5 Writing Application Codes with PETSc context with SNESShellGetContext()
xout - solution vector

Notes

the function MUST return an error code of 0 on success and nonzero on failure.

See Also

SNESSHELL, SNESShellSetContext(), SNESShellGetContext()

Level

advanced

Location

src/snes/impls/shell/snesshell.c

Examples

src/snes/tutorials/ex35.c.html

Implementations

SNESShellSetSolve_Shell(SNES snes,PetscErrorCode (*solve) in src/snes/impls/shell/snesshell.c

Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages