[petsc-users] question about contexts
Jed Brown
jedbrown at mcs.anl.gov
Sat Oct 1 12:30:18 CDT 2011
On Sat, Oct 1, 2011 at 12:28, Dominik Szczerba <dominik at itis.ethz.ch> wrote:
> Yes, thanks, this works. I somehow did not realize I can pass 'this'
> as the context.
> However, it has a serious drawback, that all the members the
> out-of-class function needs to access must be public. I guess I will
> have to live with this for now, but if you have some ideas to somehow
> make the function a "friend" of my class, I am all ears...
>
As mentioned above, make the callback function a static member of the class.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111001/4d3d10a9/attachment.htm>
More information about the petsc-users
mailing list