DMKSPSetCreateOperators#
set the KSP matrix creation function used in KSPSetUp()
Synopsis#
#include "petscksp.h"
PetscErrorCode DMKSPSetCreateOperators(DM dm, KSPCreateOperatorsFn *func, PetscCtx ctx)
Logically Collective
Input Parameters#
func - matrix creation function, for calling sequence see
KSPCreateOperatorsFnctx - context for matrix creation
Notes#
func is called by KSPSetUp() when KSPSetDMActive() has enabled the KSP_DMACTIVE_OPERATOR flag.
It is used to create once the matrices before the matrix evaluation function set with DMKSPSetComputeOperators() is called.
Pass NULL for both func and ctx to remove the callback.
If this matrix creation function is not provided, KSPSetUp() will create a single matrix A (also used for P) using DMCreateMatrix().
See Also#
KSP: Linear System Solvers, DMKSP, DM, KSP, DMKSPGetCreateOperators(), DMKSPSetComputeOperators(), KSPCreateOperatorsFn, KSPSetDMActive(), KSPSetOperators(), DMCreateMatrix()
Level#
developer
Location#
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages