[petsc-users] Neumann BC in src/ksp/ksp/example/tutorial/ex29.c

Matthew Knepley knepley at gmail.com
Fri Sep 2 11:24:24 CDT 2011


On Fri, Sep 2, 2011 at 4:21 PM, Alan Wei <zhenglun.wei at gmail.com> wrote:

> Thanks, Matt. Let me make sure, so
> Dirichlet BC on the left boundary --> u[i= 0][]  = constant
>

Yes, and usually f[i=0][] = constant - u[i=0][]


> Neumann BC on the right boundary --> u[i=16][]-u[i=15][])/dx = constant
> is that correct?
>

Yes.

    Matt


> best,
> Alan
>
>
> On Fri, Sep 2, 2011 at 10:20 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>
>> On Fri, Sep 2, 2011 at 09:20, Alan Wei <zhenglun.wei at gmail.com> wrote:
>>
>>> I thought there is a ghosted grid around Dirichlet and Neumann BC's.
>>
>>
>> Only if you ask for it with DMDA_BOUNDARY_GHOSTED (not available in
>> petsc-3.1). This example does not.
>>
>
>


-- 
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/20110902/fe7c2ce1/attachment.htm>


More information about the petsc-users mailing list