NEPSetConvergenceTest

Sets the function to be used to test convergence of the nonlinear iterative solution.

Synopsis

#include "slepcnep.h" 
PetscErrorCode NEPSetConvergenceTest(NEP nep,PetscErrorCode (*func)(NEP,PetscInt,PetscReal,PetscReal,PetscReal,NEPConvergedReason*,void*),void* ctx,PetscErrorCode (*destroy)(void*))
Logically Collective on NEP

Input Parameters

nep - the NEP context
func - a pointer to the convergence test function
ctx - [optional] context for private data for the convergence routine (may be NULL)
destroy - [optional] destructor for the context (may be NULL; PETSC_NULL_FUNCTION in Fortran)

Calling Sequence of func

  func(NEP nep,PetscInt it,PetscReal xnorm,PetscReal snorm,PetscReal fnorm,NEPConvergedReason reason*,void *fctx)

nep - the NEP context
it - iteration number
xnorm - norm of the current solution
snorm - norm of the step (difference between two consecutive solutions)
fnorm - norm of the function (residual)
reason - (output) result of the convergence test
fctx - optional context, as set by NEPSetConvergenceTest()

See Also

NEPSetTolerances()

Location: src/nep/interface/nepopts.c
Index of all NEP routines
Table of Contents for all manual pages
Index of all manual pages