[petsc-users] DMDA with cell-centered finite volume method?

Jed Brown jedbrown at mcs.anl.gov
Tue Jan 17 06:45:10 CST 2012


On Tue, Jan 17, 2012 at 02:04, Klaij, Christiaan <C.Klaij at marin.nl> wrote:

> Thanks Jed, but how would I store the grid point coordinates? The grid
> could
> be non-uniform (stretching, deforming) so I still need a 9-by-9 DM to store
> the grid point coordinates, right?
>

If you want to store coordinates that way, yes.

One way is to create a separate DMDA for the coordinates (setting lx,ly,lz
so the layout is compatible) and use
PetscObjectCompose()/PetscObjectQuery() to attach it to the "solution" DM.
If you need refinement/coarsening, you can implement it with whatever rule
you want and set up the coarse/fine DM with an attached coordinate DM.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120117/7792346c/attachment-0001.htm>


More information about the petsc-users mailing list