[petsc-users] DASetCoordinates
Randall Mackie
rlmackie862 at gmail.com
Wed Oct 6 16:35:58 CDT 2010
Thanks, I appreciate your help!
Randy M.
On Wed, Oct 6, 2010 at 2:24 PM, Jed Brown <jed at 59a2.org> wrote:
> On Wed, Oct 6, 2010 at 23:19, Randall Mackie <rlmackie862 at gmail.com>wrote:
>
>> void PETSC_STDCALL dasetcoords_(DMMG **dmmg, PetscErrorCode *ierr)
>>
>
> This is a pointer-pointer, due to the way Fortran passes parameters.
>
>
>> {
>> PetscInt i, nlev;
>>
>> nlev = DMMGGetLevels(*dmmg);
>>
>
> It has to be dereferenced once to get the thing we usually work with in C.
>
>
>> printf("The number of levels is %d \n",nlev);
>>
>> for (i=0; i < nlev; i++){
>>
>> DA da = (DA)dmmg[i]->dm;
>>
>
> You can write DA da = (DA) (*dmmg)[i]->dm;
>
> Jed
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20101006/d5676646/attachment.htm>
More information about the petsc-users
mailing list