petsc-3.4.5 2014-06-29

SNESSetErrorIfNotConverged

Causes SNESSolve() to generate an error if the solver has not converged.

Synopsis

#include "petscsnes.h"  
PetscErrorCode  SNESSetErrorIfNotConverged(SNES snes,PetscBool flg)
Logically Collective on SNES

Input Parameters

snes - iterative context obtained from SNESCreate()
flg - PETSC_TRUE indicates you want the error generated

Options database keys

-snes_error_if_not_converged : this takes an optional truth value (0/1/no/yes/true/false) -

Notes

Normally PETSc continues if a linear solver fails to converge, you can call SNESGetConvergedReason() after a SNESSolve() to determine if it has converged.

Keywords

SNES, set, initial guess, nonzero

See Also

SNESGetErrorIfNotConverged(), KSPGetErrorIfNotConverged(), KSPSetErrorIFNotConverged()

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