#include "petscksp.h" PetscErrorCode MatGetSchurComplement(Mat A,IS isrow0,IS iscol0,IS isrow1,IS iscol1,MatReuse mreuse,Mat *S,MatSchurComplementAinvType ainvtype,MatReuse preuse,Mat *Sp)Collective on Mat
A | - matrix in which the complement is to be taken | |
isrow0 | - rows to eliminate | |
iscol0 | - columns to eliminate, (isrow0,iscol0) should be square and nonsingular | |
isrow1 | - rows in which the Schur complement is formed | |
iscol1 | - columns in which the Schur complement is formed | |
mreuse | - MAT_INITIAL_MATRIX or MAT_REUSE_MATRIX, use MAT_IGNORE_MATRIX to put nothing in S | |
plump | - the type of approximation used for the inverse of the (0,0) block used in forming Sp: MAT_SCHUR_COMPLEMENT_AINV_DIAG or MAT_SCHUR_COMPLEMENT_AINV_LUMP | |
preuse | - MAT_INITIAL_MATRIX or MAT_REUSE_MATRIX, use MAT_IGNORE_MATRIX to put nothing in Sp |
S | - exact Schur complement, often of type MATSCHURCOMPLEMENT which is difficult to use for preconditioning | |
Sp | - approximate Schur complement suitable for preconditioning |
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() on the *S matrix and pass mreuse of MAT_REUSE_MATRIX to set "MatGetSchurComplement_C" to their function. If their function needs to fall back to the default implementation, it should call MatGetSchurComplement_Basic().
Level:advanced
Location:src/ksp/ksp/utils/schurm.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages