MatShellSetContextDestroy#
sets the destroy function for a MATSHELL
shell matrix context
Synopsis#
#include "petscmat.h"
PetscErrorCode MatShellSetContextDestroy(Mat mat, PetscErrorCode (*f)(void *))
Logically Collective
Input Parameters#
mat - the shell matrix
f - the context destroy function
Note#
If the MatShell
is never duplicated, the behavior of this function is equivalent
to MatShellSetOperation
(Mat
,MATOP_DESTROY
,f). However, MatShellSetContextDestroy()
ensures proper reference counting for the user provided context data in the case that
the MATSHELL
is duplicated.
See Also#
Matrices, Mat
, MATSHELL
, MatCreateShell()
, MatShellSetContext()
Level#
advanced
Location#
Implementations#
MatShellSetContextDestroy_Shell(Mat mat, PetscErrorCode (*f)() in src/mat/impls/shell/shell.c
MatShellSetContextDestroy_Immutable(Mat mat, PetscErrorCode (*f)() in src/mat/impls/shell/shell.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages