[petsc-users] DMDA Question
Tim Gallagher
tim.gallagher at gatech.edu
Fri Dec 2 13:19:47 CST 2011
Yes, I would like two DMDA's, one for the nodes and the other for the cell centers. The grid is structured, but is non-uniform.
I think I want that anyway, is that the best structure for a case like this?
Thanks,
Tim
----- Original Message -----
From: "Barry Smith" <bsmith at mcs.anl.gov>
To: gtg085x at mail.gatech.edu, "PETSc users list" <petsc-users at mcs.anl.gov>
Sent: Friday, December 2, 2011 2:12:54 PM
Subject: Re: [petsc-users] DMDA Question
Tim,
Unfortunately the DMDA was not designed with the idea of staggered grids (or mixed discretizations) in mind so they are not straightforward like we would like them to be.
Do I understand you want two DMDA
1) one that has locations for cell vertices (or face centers)?
2) and one that locations for cell centers?
Once we understand what you want we may be able to make a suggestion.
Barry
On Dec 2, 2011, at 1:08 PM, Tim Gallagher wrote:
> Hi,
>
> I'm trying to create some grids for a finite volume simulation and am a little stuck on the best way to tackle it. The approach now is to use DMDACreate3d with known number of I, J, K points and PETSC_DECIDE for the processors. Then I am trying to create another DMDA with the same distribution to store the cell centers and actual solution vector. The problem with is is the following:
>
> Consider 9 points and two processors. Processor one gets points [1,5] with point 6 as a ghost and processor two gets points [6,9] with point 5 as a ghost. But now to create/store cell centers, processor two needs point 4 to construct a cell center for it's ghost.
>
> I can certainly fetch that point and do the calculation, but I feel like there is a more elegant way to do this out there. Has anybody used a DMDA to create a dual DMDA?
>
> Any advice would be appreciated,
>
> Tim
More information about the petsc-users
mailing list