[petsc-dev] indexing for periodic BC

Barry Smith bsmith at mcs.anl.gov
Sun Jun 19 14:45:54 CDT 2011


  Jungho,

    Looks like you are "rolling" them yourself.  Just worry about the one process case with uniform grid and loop over the elements as in the structured grid.


   Barry

On Jun 19, 2011, at 2:40 PM, Jed Brown wrote:

> 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.




More information about the petsc-dev mailing list