<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Mar 25, 2014 at 12:01 PM, Fischer, Greg A. <span dir="ltr"><<a href="mailto:fischega@westinghouse.com" target="_blank">fischega@westinghouse.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:11pt"> </span></p>
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Matthew Knepley [mailto:<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>] <br>
<b>Sent:</b> Tuesday, March 25, 2014 12:50 PM<br><b>To:</b> Fischer, Greg A.<br><b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a><br><b>Subject:</b> Re: [petsc-users] function that returns the coordinates in the DMDA group?<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p><div><div><p class="MsoNormal" style="margin-left:.5in">On Tue, Mar 25, 2014 at 11:41 AM, Fischer, Greg A. <<a href="mailto:fischega@westinghouse.com" target="_blank">fischega@westinghouse.com</a>> wrote:<u></u><u></u></p>
<div><p class="MsoNormal" style="margin-left:.5in">Hello,<u></u><u></u></p><p class="MsoNormal" style="margin-left:.5in"> <u></u><u></u></p><p class="MsoNormal" style="margin-left:.5in">The FAQ indicates:<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.5in"> <u></u><u></u></p><p class="MsoNormal" style="margin-left:.5in"> The MPI_Cart_create() first divides the mesh along the z direction, then the y, then the x. DMDA divides along the x, then y, then z.<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.5in"> <u></u><u></u></p><p class="MsoNormal" style="margin-left:.5in">Is there a PETSc function call that returns the coordinates of the calling process in the DMDA group?<u></u><u></u></p>
</div><div><p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-left:.5in">I am not sure I understand exactly what you want. Can you do a small 2D example, with 4 or 6 cells?<u></u><u></u></p>
</div><div><p class="MsoNormal" style="margin-left:.5in"><span style="color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">In a 2D DMDA, my understanding is that the process ranks would be arranged as:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">2 3<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">0 1<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I would like to be able to call some function and have it return coordinates:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="FR" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">[Rank 0] (x,y) = (0, 0)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">[Rank 1] (x,y) = (0, 1)<u></u><u></u></span></p><p class="MsoNormal"><span lang="FR" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">[Rank 2] (x,y) = (1, 0)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">[Rank 3] (x,y) = (1, 1)</span></p></div></div></div></div></blockquote><div><br></div><div>
We do not have an API method for that. We give you the rank, (m,n,p) for the number of processors</div><div>in each direction, and that it is numbered lexicographically.</div><div><br></div><div> Thanks,</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 lang="EN-US" link="blue" vlink="purple"><div><div><div><p class="MsoNormal"><span lang="FR" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Greg<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p></div><div><p class="MsoNormal" style="margin-left:.5in"><span lang="FR"> </span>Thanks,<u></u><u></u></p>
</div><div><p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-left:.5in"> Matt<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-left:.5in"> <u></u><u></u></p>
</div><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in"><div><p class="MsoNormal" style="margin-left:.5in">Thanks,<u></u><u></u></p><p class="MsoNormal" style="margin-left:.5in">
Greg<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></p></div></blockquote></div><span class="HOEnZb"><font color="#888888"><p class="MsoNormal" style="margin-left:.5in"><br><br clear="all"><u></u><u></u></p>
<div><p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p></div><p class="MsoNormal" style="margin-left:.5in">-- <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 <u></u><u></u></p></font></span></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
</div></div>