petsc-3.7.1 2016-05-15
Report Typos and Errors

# PCSetErrorIfFailure

Causes PC to generate an error if a FPE, for example a zero pivot, is detected.

### Synopsis

    #include "petscksp.h"
    PetscErrorCode  PCSetErrorIfFailure(PC pc,PetscBool flg)

Logically Collective on PC Many br

### Input Parameters

| pc | - iterative context obtained from PCCreate() Many br
| flg | - PETSC_TRUE indicates you want the error generated Many br

Many br

### Notes

Normally PETSc continues if a linear solver fails due to a failed setup of a preconditioner, you can call KSPGetConvergedReason() after a KSPSolve() Many brto determine if it has converged or failed. Or use -ksp_error_if_not_converged to cause the program to terminate as soon as lack of convergence is Many brdetected. Many br

This is propagated into KSPs used by this PC, which then propagate it into PCs used by those KSPs Many br

### Keywords

PC, set, initial guess, nonzero

### See Also

PCGetInitialGuessNonzero(), PCSetInitialGuessKnoll(), PCGetInitialGuessKnoll()

Level:advanced
Location:src/ksp/pc/interface/precon.c
Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages