On Wed, Jun 15, 2011 at 19:05, Xiang Hao <haoxiang at yahoo.cn> wrote:
> Now, I have a problem when I try to change the above to a c++ version(I
> want to use a class).
Set the class pointer as the application context and use a simple wrapper:
MatMult_Wrapped(Mat A,Vec X,Vec Y) {
TheClass *cls;
MatShellGetContext(A,&cls);
return cls->matmult(A,X,Y);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110615/cf217f15/attachment.htm>