On Fri, Sep 2, 2011 at 4:21 PM, Alan Wei <span dir="ltr">&lt;<a href="mailto:zhenglun.wei@gmail.com">zhenglun.wei@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thanks, Matt. Let me make sure, so<div><span style="color:rgb(80, 0, 80);font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">Dirichlet BC on the left boundary --&gt; u[i= 0][]  = constant </span></div>
</blockquote><div><br></div><div>Yes, and usually f[i=0][] = constant - u[i=0][]</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div>
<font color="#500050" face="arial, sans-serif"><span style="font-size:13px;background-color:rgb(255, 255, 255)">Neumann BC on the right boundary --&gt; u[i=16][]-u[i=15][])/dx = </span></font><span style="color:rgb(80, 0, 80);font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">constant </span></div>

<div><font color="#500050" face="arial, sans-serif"><span style="color:rgb(0, 0, 0);font-family:arial">is that correct?</span></font></div></div></blockquote><div><br></div><div>Yes.</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><div><font color="#500050" face="arial, sans-serif"><span style="color:rgb(0, 0, 0);font-family:arial">best,</span></font></div>
<div><font color="#500050" face="arial, sans-serif"><span style="color:rgb(0, 0, 0);font-family:arial">Alan</span></font></div>
<div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">On Fri, Sep 2, 2011 at 10:20 AM, Jed Brown <span dir="ltr">&lt;<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="gmail_quote">On Fri, Sep 2, 2011 at 09:20, Alan Wei <span dir="ltr">&lt;<a href="mailto:zhenglun.wei@gmail.com" target="_blank">zhenglun.wei@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 I thought there is a ghosted grid around Dirichlet and Neumann BC&#39;s.</blockquote></div><br></div><div>Only if you ask for it with DMDA_BOUNDARY_GHOSTED (not available in petsc-3.1). This example does not.</div>
</blockquote></div><br></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>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<br>