[petsc-users] Structured Finite Difference Method With Periodic BC Help

Jed Brown jed at jedbrown.org
Fri May 6 18:13:20 CDT 2016


Barry Smith <bsmith at mcs.anl.gov> writes:

>> On May 6, 2016, at 5:09 PM, Paul Stephen Urbanczyk <gomer at stanford.edu> wrote:
>> 
>> However, this raises another question: shouldn't the coordinates behave differently than other field variables? In other words, shouldn't the periodic ghost points at the left end have coordinates (0-h) and (0-2h), rather than (1-h) and (1-2h)? And, at the right side, shouldn't the x-coordinates be 1 and 1+h?
>
>    I don't know. But I believe they should not; periodic boundary
>    conditions can be interpreted as having the domain [0,1) connected
>    at the two ends so there would never be coordinates less than 0 or
>    1 or larger. Another way, I think, of saying the same thing is that
>    if you take a point x in domain and add some positive distance d
>    then the coordinate of the result is give by fractionalpart(x + d)
>    something similar can be done for subtracting some distance. 

Additionally, making up coordinates for ghost points is not well-defined
for non-uniform or distorted grids.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160506/00d6f6a7/attachment.pgp>


More information about the petsc-users mailing list