<div dir="ltr">On Sat, Feb 16, 2013 at 9:11 AM, Hui Zhang <span dir="ltr"><<a href="mailto:mike.hui.zhang@hotmail.com" target="_blank">mike.hui.zhang@hotmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Why? When I try to use ((PetscObject)M)->comm in my function as follows,<br></blockquote><div><br></div><div style>
We now have PetscObjectComm((PetscObject) M) which is safer.</div><div style><br></div><div style> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
PetscErrorCode SetupDirectSolver(KSP *ksp, Mat M)<br>
{<br>
<br>
KSPCreate(((PetscObject)M)->comm,ksp);<br>
<br>
}<br>
<br>
I got<br>
<br>
error: dereferencing pointer to incomplete type<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener
</div></div>