22 Nov
2010
22 Nov
'10
3:34 p.m.
On Nov 22, 2010, at 3:23 PM, Chris Bording wrote:
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; ^^^^^^ Note this ...Vec b;
Myfunc(dmmg,b) }
PetscErrorCode Myfunc(DMMG *dmmg, Vec b) ^^^ add this
{ 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