<div dir="ltr"><div>Hi Matthew,</div><div><br></div><div>Thank you for the clarification, however, it is unclear why there is an additional unknown in the case of periodic bcs. </div><div><br></div><div>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. </div><div><br></div><div>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.</div><div><br></div><div>Hope I was clear enough,</div><div>thanks</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-04-27 16:15 GMT+02:00 Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Thu, Apr 27, 2017 at 3:46 AM, neok m4700 <span dir="ltr"><<a href="mailto:neok.m4700@gmail.com" target="_blank">neok.m4700@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I am trying to change my problem to using periodic boundary conditions.</div><div><br></div><div>However, when I use DMDASetUniformCoordinates on the DA, the spacing changes.</div><div><br></div><div>This is due to an additional point e.g. in dm/impls/da/gr1.c</div><div><br></div><div><div>else if (dim == 2) {</div><div>    if (bx == DM_BOUNDARY_PERIODIC) hx = (xmax-xmin)/(M);</div><div>    else hx = (xmax-xmin)/(M-1);</div><div>    if (by == DM_BOUNDARY_PERIODIC) hy = (ymax-ymin)/(N);</div><div>    else hy = (ymax-ymin)/(N-1);</div></div><div><br></div><div>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 ?</div><div><br></div><div>Could someone clarify or point to a reference ?</div></div></blockquote><div><br></div></span><div>Just do a 1D example with 3 vertices. With a normal domain, you have 2 cells</div><div><br></div><div>  1-----2-----3</div><div><br></div><div>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</div><div><br></div><div>  1-----2-----3-----1</div><div><br></div><div>and each is 1/3 of the domain.</div><div><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Thanks</div></div><span class="HOEnZb"><font color="#888888">
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_315729333750417746gmail_signature" data-smartmail="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</font></span></div></div>
</blockquote></div><br></div></div>