Thanks, I appreciate your help!<br><br>Randy M. <br><br><div class="gmail_quote">On Wed, Oct 6, 2010 at 2:24 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@59a2.org">jed@59a2.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="gmail_quote"><div class="im">On Wed, Oct 6, 2010 at 23:19, Randall Mackie <span dir="ltr"><<a href="mailto:rlmackie862@gmail.com" target="_blank">rlmackie862@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>void PETSC_STDCALL dasetcoords_(DMMG **dmmg, PetscErrorCode *ierr)<br></div></blockquote><div><br></div></div><div>This is a pointer-pointer, due to the way Fortran passes parameters.</div><div class="im"><div> </div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
{<br> PetscInt i, nlev;<br><br> nlev = DMMGGetLevels(*dmmg);<br></div></blockquote><div><br></div></div><div>It has to be dereferenced once to get the thing we usually work with in C.</div><div class="im"><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div> printf("The number of levels is %d \n",nlev);<br><br> for (i=0; i < nlev; i++){<div><br> DA da = (DA)dmmg[i]->dm;<br></div></div></blockquote><div><br></div></div><div>You can write DA da = (DA) (*dmmg)[i]->dm;</div>
<div> </div><font color="#888888"><div>Jed</div></font></div>
</blockquote></div><br>