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 <knep...@gmail.com>:

> On Thu, Apr 27, 2017 at 3:46 AM, neok m4700 <neok.m4...@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
>

Attachment: 1D.pdf
Description: Adobe PDF document

Reply via email to