You need to indicate that the DA is periodic when you create it.<div><br></div><div> Matt<br><br><div class="gmail_quote">On Tue, Nov 30, 2010 at 4:32 PM, khalid ashraf <span dir="ltr"><<a href="mailto:khalid_eee@yahoo.com">khalid_eee@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="font-family:arial, helvetica, sans-serif;font-size:18pt"><div><span style="font-family:Times;font-size:medium"><pre>
<i>Thanks Barry. It works fine. Another question, I have a Periodic Boundary</i></pre><pre><i>condition along x and y. So I want to use the two commented out line below.</i></pre><pre><i> for (j=ys; j<ys+ym; j++) {
</i><i> for (i=xs; i<xs+xm; i++) {
</i><i> if (i<(mx-1))
</i><i> {
</i><i> Cx=u_localptr[k][j][i+1]-u_localptr[k][j][i];
</i><i> }
</i><i> else
</i><i> {
</i><i>// Cx=u_localptr[k][j][i]-u_localptr[k][j][0];
</i><i> }
</i><i> if (j<(my-1))
</i><i> {
</i><i> Cy=v_localptr[k][j+1][i]-v_localptr[k][j][i];
</i><i> }
</i><i> else
</i><i> {</i></pre><pre><i></i><i> // Cy=v_localptr[k][j][i]-v_localptr[k][0][i];
</i><i> }
</i><i><br></i></pre><pre><i>Is it possible to include these non-local points [k][j][0] or [k][0][i]. Or I have to </i></pre><pre><i>include the boundary points in the grid ? The same question when forming the A matrix with </i></pre>
<pre><i>PBC. How to include the non-neighbour elements within the if statement. </i></pre><pre><i><br></i></pre><pre><i>Thanks.</i></pre><pre><i><br></i></pre><pre><i>Khalid</i></pre></span></div><div></div>
</div><br>
</div></blockquote></div><br><br clear="all"><br>-- <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>
</div>