Convergence test that adds a vector in the nullspace to make the continuum integral of the pressure field equal to zero. This is normally used only to evaluate convergence rates for the pressure accurately. The convergence test itself just mimics SNESConvergedDefault().
PetscErrorCode SNESConvergedCorrectPressure(SNES snes, PetscInt it, PetscReal xnorm, PetscReal gnorm, PetscReal f, SNESConvergedReason *reason, void *ctx)
Logically Collective on SNES
|snes ||- the SNES context
|it ||- the iteration (0 indicates before any Newton steps)
|xnorm ||- 2-norm of current iterate
|snorm ||- 2-norm of current step
|fnorm ||- 2-norm of function at current iterate
|ctx ||- Optional user context
In order to use this monitor, you must setup several PETSc structures. First fields must be added to the DM, and a PetscDS must be created with discretizations of those fields. We currently assume that the pressure field has index 1. The pressure field must have a nullspace, likely created using the DMSetNullSpaceConstructor() interface. Last we must be able to integrate the pressure over the domain, so the DM attached to the SNES must be a Plex at this time.
SNESConvergedDefault(), SNESSetConvergenceTest(), DMSetNullSpaceConstructor()
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages