<div class="gmail_quote">On Wed, Oct 6, 2010 at 23:19, Randall Mackie <span dir="ltr"><<a href="mailto:rlmackie862@gmail.com">rlmackie862@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":1f3">void PETSC_STDCALL dasetcoords_(DMMG **dmmg, PetscErrorCode *ierr)<br></div></blockquote><div><br></div><div>This is a pointer-pointer, due to the way Fortran passes parameters.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":1f3">
{<br> PetscInt i, nlev;<br><br> nlev = DMMGGetLevels(*dmmg);<br></div></blockquote><div><br></div><div>It has to be dereferenced once to get the thing we usually work with in C.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":1f3"> printf("The number of levels is %d \n",nlev);<br><br> for (i=0; i < nlev; i++){<div class="im"><br> DA da = (DA)dmmg[i]->dm;<br></div></div></blockquote><div><br></div><div>You can write DA da = (DA) (*dmmg)[i]->dm;</div>
<div> </div><div>Jed</div></div>