petsc-3.13.6 2020-09-29
MatSchurComplementGetPmat
Obtain a preconditioning matrix for the Schur complement by assembling Sp = A11 - A10 inv(diag(A00)) A01
Synopsis
#include "petscksp.h"
PetscErrorCode MatSchurComplementGetPmat(Mat S,MatReuse preuse,Mat *Sp)
Collective on S
Input Parameters
Output Parameter
Sp -approximate Schur complement suitable for preconditioning S = A11 - A10 inv(diag(A00)) A01
Note
Since the real Schur complement is usually dense, providing a good approximation to newpmat usually requires
Section 1.5 Writing Application Codes with PETSc-specific information. The default for assembled matrices is to use the inverse of the diagonal of
the (0,0) block A00 in place of A00^{-1}. This rarely produce a scalable algorithm. Optionally, A00 can be lumped
before forming inv(diag(A00)).
Sometimes users would like to provide problem-specific data in the Schur complement, usually only
for special row and column index sets. In that case, the user should call PetscObjectComposeFunction() to set
"MatSchurComplementGetPmat_C" to their function. If their function needs to fall back to the default implementation,
it should call MatSchurComplementGetPmat_Basic().
Developer Notes
The API that includes MatGetSchurComplement(), MatCreateSchurComplement(), MatSchurComplementGetPmat() should be refactored to
remove redundancy and be clearer and simplier.
See Also
MatCreateSubMatrix(), PCFIELDSPLIT, MatGetSchurComplement(), MatCreateSchurComplement(), MatSchurComplementSetAinvType()
Level
advanced
Location
src/ksp/ksp/utils/schurm/schurm.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages