<div class="gmail_quote">On Wed, Dec 21, 2011 at 08:54,  <span dir="ltr">&lt;<a href="mailto:E.T.A.vanderWeide@utwente.nl">E.T.A.vanderWeide@utwente.nl</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks, this is working. The only problem I still have is that I have to store much more than just a vector in context of MATSHELL in order to carry out the matrix vector multiplication. I basically need all the contents of an object of a certain class. I tried to store the this pointer of the object in the context of MATSHELL, but then I get an error. So it looks like it is not allowed to pass the this pointer to MatShellSetContext, is that correct?</blockquote>
</div><br><div>How are you calling MatShellSetContext() and what is the error? You can pass &quot;this&quot;, but the callback should be either a standalone function or a static member function.</div>