[petsc-dev] Use of DMDA to manage structured but staggered grid

Chris Eldred chris.eldred at gmail.com
Tue Nov 17 11:04:09 CST 2015


Hey petsc-dev,

As the title suggests, I would like to use DMDA to manage a structured
but staggered grid (initially in 2D, but eventually in 3D). I would
like to have dofs at cells, vertices and edges (also faces in 3D). I
would use DMPlex for this, but I need access to larger stencils than
closure/star, and it seems difficult get those in a consistent
(properly numbered/ordered) way using Plex (with DMDA the
numbering/ordering is built into the indexing, so it is trivial). If
this is a mistaken assumption, and it is in fact easy to get
consistent larger stencils in Plex, I am more than happy to use it
instead.

What is the best way to do this?

Looking around, it seems like DMDACreateSection might be a good place
to start, but the implementation doesn't seem to match the
documentation- in particular there is no argument for numFields. Is
there an example using DMDACreateSection to actually manage a
staggered grid discretization?

The other option seems to be using a normal DMDA and dealing with the
multiple dofs per geometric entity myself - ie something like SNES
example 30.

Any insight or advice on the optimal way to do this would be appreciated!

Thanks,
Chris Eldred

-- 
Chris Eldred
Postdoctoral Fellow, LAGA, University of Paris 13
PhD, Atmospheric Science, Colorado State University, 2015
DOE Computational Science Graduate Fellow (Alumni)
B.S. Applied Computational Physics, Carnegie Mellon University, 2009
chris.eldred at gmail.com



More information about the petsc-dev mailing list