<div class="gmail_quote">On Wed, Dec 21, 2011 at 11:30, <span dir="ltr"><<a href="mailto:E.T.A.vanderWeide@utwente.nl">E.T.A.vanderWeide@utwente.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<font>ierr = MatShellSetContext(mat, this);<br></font></blockquote><div><br></div><div>This is fine.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font>
CHKERRQ(ierr);<br>
<br>
Later on in the call to MatShellGetContext I get the following error<br>
[0]PETSC ERROR: MatShellGetContext() line 201 in src/mat/impls/shell/shell.c Null Pointer: Parameter # 2<br></font></blockquote><div><br></div><div>You need to pass a valid address. Show us what this code looks like. It should be something like</div>
<div><br></div><div>MyContext *ptr;</div><div>MatShellGetContext(mat,&ptr);</div></div>