int MatShellSetOperation(Mat mat,MatOperation op, void *f)
Collective on Mat
extern int usermult(Mat,Vec,Vec);
ierr = MatCreateShell(comm,m,n,M,N,ctx,&A);
ierr = MatShellSetOperation(A,MATOP_MULT,usermult);
All user-provided functions should 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().
Location: src/mat/impls/shell/shell.c
Matrix Index
Table of Contents