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