petsc-3.4.2 2013-07-02

# MatShellSetContext

sets the context for a shell matrix

### Synopsis

    #include "petscmat.h"
    PetscErrorCode  MatShellSetContext(Mat mat,void *ctx)

Logically Collective on Mat

### Input Parameters

| mat | - the shell matrix
| ctx | - the context

Fortran Notes: The context can only be an integer or a PetscObject unfortunately it cannot be a Fortran array or derived type.

### See Also

MatCreateShell(), MatShellGetContext(), MatShellGetOperation()

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

### Examples

src/snes/examples/tutorials/ex12.c.html
src/snes/examples/tutorials/ex31.c.html
src/snes/examples/tutorials/ex62.c.html