On Thu, Aug 25, 2011 at 11:24 PM, Alan Wei <span dir="ltr"><<a href="mailto:zhenglun.wei@gmail.com">zhenglun.wei@gmail.com</a>></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;">
Dear all,<div> I hope you had a nice day.</div><div> I have a little bit confusion on <span style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">src/ksp/ksp/example/tutorial/ex29.c, which is solving a Poisson equation. </span><span style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">The key problem is that I confused what is the ghosted node, computed nodes and boundary nodes. </span></div>
<div><span style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)"> 1) For example, if the mesh has 20 * 50 grid on x-, y- direction. For my understanding, nodes of i = 0, i = 19, j = 0, j = 49 are all boundary nodes and others are computation nodes. I</span><span style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">f a Dirichlet boundary condition is applied in node j = 49, then the value of node j = 49 should be a constant; while, i</span><span style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">f a Neumann boundary condition is applied in j = 49, then change rate from node j = 48 to j = 49 should be a constant. </span></div>
</blockquote><div><br></div><div>Fine.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><span style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)"> 2) Moreover, If this code is ran with 2 processes, which 2 on y-direction. This leads a 20 * 25 mesh for each nodes, then the ghost nodes is created around the local mesh in order to pass data back and forth with the other node. Is that correct? However, what is the ghost nodes coordinate value and index?</span></div>
</blockquote><div><br></div><div>For proc0, the ghost nodes would be j = 25, and for proc 1 j = 24. However, you should not need to worry about this.</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><span style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">Thanks in advance,</span></div>
<div><span style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">Alan</span></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>