MatShellGetOperation

Gets a matrix function for a shell matrix.

Synopsis

int MatShellGetOperation(Mat mat,MatOperation op, void **f)

Input Parameters

mat -the shell matrix
op -the name of the operation

Output Parameter

f -the function that provides the operation.

Not Collective

Notes

See the file petsc/include/mat.h for a complete list of matrixoperations, which all have the form MATOP_<OPERATION>, where<OPERATION> is the name (in all capital letters) of theuser interface routine (e.g., MatMult() -> MATOP_MULT).

All user-provided functions have the same callingsequence as the usual matrix interface routines, since theyare intended to be accessed via the usual matrix interfaceroutines, e.g.,

      MatMult(Mat,Vec,Vec) -> usermult(Mat,Vec,Vec)

Within each user-defined routine, the user should callMatShellGetContext() to obtain the user-defined context that wasset by MatCreateShell().

Keywords

matrix, shell, set, operation

See Also

MatCreateShell(), MatShellGetContext(), MatShellSetOperation()

Location: src/mat/impls/shell/shell.c
Matrix Index
Table of Contents