petsc-3.7.7 2017-09-25
Report Typos and Errors

# PCSHELL

Creates a new preconditioner class for use with your own private data storage format. >

### Usage

                extern PetscErrorCode apply(PC,Vec,Vec);

                extern PetscErrorCode applyba(PC,PCSide,Vec,Vec,Vec);

                extern PetscErrorCode applytranspose(PC,Vec,Vec);

                extern PetscErrorCode setup(PC);

                extern PetscErrorCode destroy(PC);

                PCCreate(comm,&pc);

                PCSetType(pc,PCSHELL);

                PCShellSetContext(pc,ctx)

                PCShellSetApply(pc,apply);

                PCShellSetApplyBA(pc,applyba);               (optional)

                PCShellSetApplyTranspose(pc,applytranspose); (optional)

                PCShellSetSetUp(pc,setup);                   (optional)

                PCShellSetDestroy(pc,destroy);               (optional)

### See Also

PCCreate(), PCSetType(), PCType (for list of available types), PC,
MATSHELL, PCShellSetSetUp(), PCShellSetApply(), PCShellSetView(), PCShellSetApplyTranspose(), PCShellSetName(), PCShellSetApplyRichardson(), PCShellGetName(), PCShellSetContext(), PCShellGetContext(), PCShellSetApplyBA()

Level:advanced
Location:src/ksp/pc/impls/shell/shellpc.c
Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/ksp/ksp/examples/tutorials/ex15.c.html
src/ksp/ksp/examples/tutorials/ex15f.F.html
src/ksp/ksp/examples/tutorials/ex21f.F.html
src/snes/examples/tutorials/ex3.c.html
src/snes/examples/tutorials/ex74f.F90.html
src/tao/pde_constrained/examples/tutorials/parabolic.c.html
src/tao/pde_constrained/examples/tutorials/hyperbolic.c.html