petsc-3.14.6 2021-03-30
Report Typos and Errors

MatCreateSchurComplement

Creates a new matrix object that behaves like the Schur complement of a matrix

Synopsis

#include "petscksp.h" 
PetscErrorCode  MatCreateSchurComplement(Mat A00,Mat Ap00,Mat A01,Mat A10,Mat A11,Mat *S)
Collective on A00

Input Parameters

A00,A01,A10,A11 - the four parts of the original matrix A = [A00 A01; A10 A11] (A11 is optional)
Ap00 - preconditioning matrix for use in ksp(A00,Ap00) to approximate the action of A^{-1}

Output Parameter

S - the matrix that the Schur complement S = A11 - A10 ksp(A00,Ap00) A01

Notes

The Schur complement is NOT actually formed! Rather, this object performs the matrix-vector product by using formula S = A11 - A10 A^{-1} A01 for Schur complement S and a KSP solver to approximate the action of A^{-1}.

All four matrices must have the same MPI communicator.

A00 and A11 must be square matrices.

MatGetSchurComplement() takes as arguments the index sets for the submatrices and returns both the virtual Schur complement (what this returns) plus a sparse approximation to the true Schur complement (useful for building a preconditioner for the Schur complement).

MatSchurComplementGetPmat() can be called on the output of this function to generate an explicit approximation to the Schur complement.

Developer Notes

The API that includes MatGetSchurComplement(), MatCreateSchurComplement(), MatSchurComplementGetPmat() should be refactored to remove redundancy and be clearer and simplier.

See Also

MatCreateNormal(), MatMult(), MatCreate(), MatSchurComplementGetKSP(), MatSchurComplementUpdateSubMatrices(), MatCreateTranspose(), MatGetSchurComplement(),
MatSchurComplementGetPmat()

Level

intermediate

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