petsc-3.7.1 2016-05-15
Report Typos and Errors

# MatShellGetOperation

Gets a matrix function for a shell matrix.

### Synopsis

    #include "petscmat.h"
    PetscErrorCode  MatShellGetOperation(Mat mat,MatOperation op,void(**f)(void))

Not Collective Many br

### Input Parameters

| mat | - the shell matrix Many br
| op | - the name of the operation Many br

### Output Parameter

f -the function that provides the operation. Many br

Many br

### Notes

See the file include/petscmat.h for a complete list of matrix Many broperations, which all have the form MATOP_<OPERATION>, where Many br<OPERATION> is the name (in all capital letters) of the Many bruser interface routine (e.g., MatMult() -> MATOP_MULT). Many br

All user-provided functions have the same calling Many brsequence as the usual matrix interface routines, since they Many brare intended to be accessed via the usual matrix interface Many brroutines, e.g., Many br

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

Within each user-defined routine, the user should call Many brMatShellGetContext() to obtain the user-defined context that was Many brset by MatCreateShell(). Many br

### Keywords

matrix, shell, set, operation

### See Also

MatCreateShell(), MatShellGetContext(), MatShellSetOperation(), MatShellSetContext()

Level:advanced
Location:src/mat/impls/shell/shell.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages