MatCreateSchurComplement

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

Synopsis

#include "petscmat.h" 
#include "petscksp.h" 
PetscErrorCode PETSCMAT_DLLEXPORT MatCreateSchurComplement(Mat A,Mat B,Mat C,Mat D,Mat *N)
Collective on Mat

Input Parameter

A,B,C,D -the four parts of the original matrix (D is optional)

Output Parameter

N -the matrix that the Schur complement D - C inv(A) B

Notes: The Schur complement is NOT actually formed! Rather this object performs the matrix-vector product by using the the formula for the Schur complement and a KSP solver to approximate the action of inv(A)

All four matrices must have the same MPI communicator

A and D must be square matrices

See Also

MatCreateNormal(), MatMult(), MatCreate(), MatSchurComplementGetKSP(), MatSchurComplementUpdate(), MatCreateTranspose()

Level:intermediate
Location:
src/ksp/ksp/utils/schurm.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages