Skip to main content
`Ctrl`+`K`

# LMESetErrorIfNotConverged

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

## Synopsis

    #include "slepclme.h"
    PetscErrorCode LMESetErrorIfNotConverged(LME lme,PetscBool flg)

Logically Collective

## Input Parameters

- lme - the linear matrix equation solver context

- flg - `PETSC_TRUE` indicates you want the error generated

## Options Database Key

- -lme_error_if_not_converged - generate an error and stop the program

## Note

Normally SLEPc continues if the solver fails to converge, you can call `LMEGetConvergedReason()` after a `LMESolve()` to determine if it has converged.

## See Also

LME: Linear Matrix Equation, `LMEGetErrorIfNotConverged()`

## Level

intermediate

## Location

src/lme/interface/lmeopts.c

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