MatFactorCreateSchurComplement#

Create a Schur complement matrix object using Schur data computed during the factorization step

Synopsis#

#include "petscmat.h" 
PetscErrorCode MatFactorCreateSchurComplement(Mat F, Mat *S, MatFactorSchurStatus *status)

Logically Collective

Input Parameters#

  • F - the factored matrix obtained by calling MatGetFactor()

  • S - location where to return the Schur complement, can be NULL

  • status - the status of the Schur complement matrix, can be NULL

Notes#

You must call MatFactorSetSchurIS() before calling this routine.

This functionality is only supported for MATSOLVERMUMPS and MATSOLVERMKL_PARDISO

The routine provides a copy of the Schur matrix stored within the solver data structures. The caller must destroy the object when it is no longer needed. If MatFactorInvertSchurComplement() has been called, the routine gets back the inverse.

Use MatFactorGetSchurComplement() to get access to the Schur complement matrix inside the factored matrix instead of making a copy of it (which this function does)

See MatCreateSchurComplement() or MatGetSchurComplement() for ways to create virtual or approximate Schur complements.

Developer Note#

The reason this routine exists is because the representation of the Schur complement within the factor matrix may be different than a standard PETSc matrix representation and we normally do not want to use the time or memory to make a copy as a regular PETSc matrix.

See Also#

Matrices, Mat, MatGetFactor(), MatFactorSetSchurIS(), MatFactorGetSchurComplement(), MatFactorSchurStatus, MATSOLVERMUMPS, MATSOLVERMKL_PARDISO

Level#

advanced

Location#

src/mat/interface/matrix.c

Implementations#

MatFactorCreateSchurComplement_MUMPS() in src/mat/impls/aij/mpi/mumps/mumps.c


Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages