KSPCreateOperatorsFn#

A prototype of a KSP operator creation function that would be passed to DMKSPSetCreateOperators()

Synopsis#

PETSC_EXTERN_TYPEDEF typedef PetscErrorCode KSPCreateOperatorsFn(KSP ksp, Mat *A, Mat *P, PetscCtx ctx);

Calling Sequence#

  • ksp - KSP context

  • A - the created operator that defines the linear system

  • P - the created operator from which to build the preconditioner, often the same as A

  • ctx - [optional] user-defined function context

Notes#

The returned matrices are owned by the caller, similar to DMCreateMatrix().

A and P may be the same object. In such a case, users do not need to increase the reference count of A. If P is not returned, then we assume it is the same of A.

See Also#

KSP: Linear System Solvers, DMKSPSetCreateOperators(), DMKSPGetCreateOperators(), KSPComputeOperatorsFn, KSPSetOperators()

Level#

developer

Location#

include/petscksp.h


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