[petsc-users] ((PetscObject)M)->comm

Matthew Knepley knepley at gmail.com
Sat Feb 16 08:25:51 CST 2013


On Sat, Feb 16, 2013 at 9:11 AM, Hui Zhang <mike.hui.zhang at hotmail.com>wrote:

> Why?  When I try to use ((PetscObject)M)->comm in my function as follows,
>

We now have PetscObjectComm((PetscObject) M) which is safer.

   Matt


> PetscErrorCode SetupDirectSolver(KSP *ksp, Mat M)
> {
>
>    KSPCreate(((PetscObject)M)->comm,ksp);
>
> }
>
> I got
>
>     error: dereferencing pointer to incomplete type
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130216/6de33f90/attachment-0001.html>


More information about the petsc-users mailing list