Hi I am trying to pass the DMMG struct to a function similar to what is in the examples.<br><br>extern PetscErrorCode Myfunc(DMMG,Vec);<br><br><br>int main(int argc,char **argv)<br>{<br> DMMG *dmmg;<br>...Vec b;<br>
<br>Myfunc(dmmg,b)<br>}<br><br>PetscErrorCode Myfunc(DMMG dmmg, Vec b)<br>{<br> DA da = (DA)dmmg->dm;<br>.....<br>}<br><br>error: cannot convert ‘_n_DMMG**’ to ‘_n_DMMG*’ for argument ‘1’ to ‘PetscErrorCode Myfunc(_n_DMMG*, _p_Vec*)<br>
<br>So how do I pass a DMMG defined structure into my function? <br><br><br><br>Thanks<br>Chris <br>