Output Parameters

S

- exact Schur complement, often of type MATSCHURCOMPLEMENT which is difficult to use for preconditioning

Sp

- approximate Schur complement from which a preconditioner can be built

Note

Since the real Schur complement is usually dense, providing a good approximation to newpmat usually requires
application-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() 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().

MatCreateSchurComplement() takes as arguments the four submatrices and returns the virtual Schur complement (what this returns in S).

In other words calling MatCreateSchurComplement() followed by MatSchurComplementGetPmat() produces the same output as this function but with slightly different
inputs. The actually submatrices of the original block matrix instead of index sets to the submatrices.