extern PetscErrorCode (*apply)(void*,Vec,Vec);
extern PetscErrorCode (*applytrans)(void*,Vec,Vec);
extern PetscErrorCode (*applyht)(void*,Vec,Vec);
extern PetscErrorCode (*backtr)(void*,PetscScalar*,PetscScalar*);
STCreate(comm,&st);
STSetType(st,STSHELL);
STShellSetContext(st,ctx);
STShellSetApply(st,apply);
STShellSetApplyTranspose(st,applytrans); (optional)
STShellSetApplyHermitianTranspose(st,applyht); (optional, only in complex scalars)
STShellSetBackTransform(st,backtr); (optional)