On Mon, Apr 18, 2011 at 8:34 AM, ilyas ilyas <span dir="ltr"><<a href="mailto:ilyascfd@gmail.com">ilyascfd@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;">
<div>Hi,<br></div><div><br></div><div>In ex14f.F in KSP, "row" variable is calculated either</div></blockquote><div><br></div><div>These are very old. I suggest you use the FormFunctionLocal() approach in ex5f.F which</div>
<div>does not calculate global row numbers when using a DA.</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>349: do 30 j=ys,ys+ym-1<br>
350: ...</div><div>351: do 40 i=xs,xs+xm-1<br>
352: row = i - gxs + (j - gys)*gxm + 1<br></div><div><br></div><div>or</div><div><br></div><div>442: do 50 j=ys,ys+ym-1<br>443: ...<br>444: row = (j - gys)*gxm + xs - gxs<br>445: do 60 i=xs,xs+xm-1<br>
446: row = row + 1<br></div><div><br></div><div>How can I calculate "row" in 3D ? </div><div><br></div><div>I tried this;</div><div><br></div><div>do k=zs,zs+zm-1<br> do j=ys,ys+ym-1<br> do i=xs,xs+xm-1<br>
<br>                  row = i - gxs + (j - gys)*gxm + (k - gzs)*gxm*gym + 1<br><br></div><div>It does not work for certain number of processors.</div><div><br></div><div><br></div><div>Thanks,</div><div><br></div><font color="#888888"><div>
Ilyas</div>
</font></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>