<div class="gmail_quote">On Sun, Jun 19, 2011 at 21:34, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
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?</blockquote>
</div><br><div>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().</div>
<div><br></div><div>Are you using triangles or quads? This is very natural if you have a structured grid and use quads.</div>