[petsc-users] explanations on DM_BOUNDARY_PERIODIC

neok m4700 neok.m4700 at gmail.com
Thu Apr 27 03:46:59 CDT 2017


Hi,

I am trying to change my problem to using periodic boundary conditions.

However, when I use DMDASetUniformCoordinates on the DA, the spacing
changes.

This is due to an additional point e.g. in dm/impls/da/gr1.c

else if (dim == 2) {
    if (bx == DM_BOUNDARY_PERIODIC) hx = (xmax-xmin)/(M);
    else hx = (xmax-xmin)/(M-1);
    if (by == DM_BOUNDARY_PERIODIC) hy = (ymax-ymin)/(N);
    else hy = (ymax-ymin)/(N-1);

I don't understand the logic here, since xmin an xmax refer to the physical
domain, how does changing to a periodic BC change the discretization ?


Could someone clarify or point to a reference ?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170427/ed53d149/attachment.html>


More information about the petsc-users mailing list