[petsc-users] Passing DMMG struct.

Chris Bording chris.bording at gmail.com
Mon Nov 22 15:23:58 CST 2010


Hi I am trying to pass the DMMG struct to a function similar to what is in
the examples.

extern PetscErrorCode Myfunc(DMMG,Vec);


int main(int argc,char **argv)
{
  DMMG           *dmmg;
...Vec b;

Myfunc(dmmg,b)
}

PetscErrorCode Myfunc(DMMG dmmg, Vec b)
{
  DA             da = (DA)dmmg->dm;
.....
}

error: cannot convert ‘_n_DMMG**’ to ‘_n_DMMG*’ for argument ‘1’ to
‘PetscErrorCode Myfunc(_n_DMMG*, _p_Vec*)

So how do I pass a DMMG defined structure into my function?



Thanks
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20101122/f1a058db/attachment.htm>


More information about the petsc-users mailing list