[petsc-dev] indexing for periodic BC

Jed Brown jed at 59A2.org
Sun Jun 19 14:40:58 CDT 2011


On Sun, Jun 19, 2011 at 21:34, Barry Smith <bsmith at mcs.anl.gov> wrote:

> This is a problem for Jungho and I right now because the VI problems we are
> solving should really have periodic boundary conditions. So we either fix
> the GetElements() (uniform grid is fine) or  she manages marching over the
> mesh herself.  What should it be?


All the DMDA finite element codes that I have written (and others who do
FEM, like Dave May) have rolled the loop over elements ourselves. It is
easier to handle partial Dirichlet conditions this way too. Rolling the loop
yourself takes perhaps four lines more code than calling DMDAGetElements().

Are you using triangles or quads? This is very natural if you have a
structured grid and use quads.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110619/7630aa92/attachment.html>


More information about the petsc-dev mailing list