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

# KSPSetLagNorm

Lags the residual norm calculation so that it is computed as part of the MPI_Allreduce() for computing the inner products for the next iteration. This can reduce communication costs at the expense of doing one additional iteration.

### Synopsis

    #include "petscksp.h"
    PetscErrorCode  KSPSetLagNorm(KSP ksp,PetscBool flg)

Logically Collective on KSP Many br

### Input Parameter

| ksp | - Krylov solver context Many br
| flg | - PETSC_TRUE or PETSC_FALSE Many br

### Options Database Keys

-ksp_lag_norm -lag the calculated residual norm Many br

### Notes

Currently only works with KSPIBCGS. Many br

Use KSPSetNormType(ksp,KSP_NORM_NONE) to never check the norm Many br

If you lag the norm and run with, for example, -ksp_monitor, the residual norm reported will be the lagged one. Many br Many br

### Keywords

KSP, create, context, norms

### See Also

KSPSetUp(), KSPSolve(), KSPDestroy(), KSPConvergedSkip(), KSPSetNormType(), KSPSetCheckNormIteration()

Level:advanced
Location:src/ksp/ksp/interface/itcreate.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages