[petsc-users] explanations on DM_BOUNDARY_PERIODIC

neok m4700 neok.m4700 at gmail.com
Thu Apr 27 12:43:39 CDT 2017


Hi Matthew,

Thank you for the clarification, however, it is unclear why there is an
additional unknown in the case of periodic bcs.

Please see attached to this email what I'd like to achieve, the number of
unknowns does not change when switching to the periodic case for e.g. a
laplace operator.

And in the case of dirichlet or neumann bcs, the extremum cell add
information to the RHS, they do not appear in the matrix formulation.

Hope I was clear enough,
thanks


2017-04-27 16:15 GMT+02:00 Matthew Knepley <knepley at gmail.com>:

> On Thu, Apr 27, 2017 at 3:46 AM, neok m4700 <neok.m4700 at gmail.com> wrote:
>
>> 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 ?
>>
>
> Just do a 1D example with 3 vertices. With a normal domain, you have 2
> cells
>
>   1-----2-----3
>
> so each cell is 1/2 of the domain. In a periodic domain, the last vertex
> is connected to the first, so we have 3 cells
>
>   1-----2-----3-----1
>
> and each is 1/3 of the domain.
>
>    Matt
>
>
>> Thanks
>>
>
>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170427/2f3d10fb/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1D.pdf
Type: application/pdf
Size: 69178 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170427/2f3d10fb/attachment-0001.pdf>


More information about the petsc-users mailing list