<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px;"><font class="Apple-style-span" size="4"><span class="Apple-style-span" style="font-size: 16px;">Thanks Barry. I get the correct output when I use&nbsp;</span></font></span></font></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px;"><font class="Apple-style-span" size="4"><span class="Apple-style-span" style="font-size: 16px;">VecView(w,PETSC_VIEWER_STDOUT_WORLD)</span></font></span></font></div><div><br></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px;"><font class="Apple-style-span" size="4"><span class="Apple-style-span" style="font-size: 16px;">But if I use the&nbsp;VecView_VTK function from the
 file</span></font></span></font></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px;"><font class="Apple-style-span" size="4"><span class="Apple-style-span" style="font-size: 16px;"><span class="Apple-style-span" style="font-family: monospace, helvetica, sans-serif; font-size: medium; font-style: italic; white-space: pre; ">ksp/ksp/examples/tutorials/ex29.c</span></span></font></span></font></div><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><div style="font-family:arial, helvetica, sans-serif;font-size:13px"><br>then I get different results.</div><div style="font-family:arial, helvetica, sans-serif;font-size:13px"><br></div><div style="font-family:arial, helvetica, sans-serif;font-size:13px">For the code:</div><div style="font-family:arial, helvetica, sans-serif;font-size:13px">if (i&lt;m/2) vec=0.001 else vec=-0.001;</div><div style="font-family:arial, helvetica,
 sans-serif;font-size:13px"><br></div><div style="font-family:arial, helvetica, sans-serif;font-size:13px">Output with VecView: &nbsp; &nbsp; 0.001 for half of the grid</div><div style="font-family:arial, helvetica, sans-serif;font-size:13px">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-0.001 for rest half of the grid</div><div style="font-family:arial, helvetica, sans-serif;font-size:13px">Output with VecView_VTK:</div><div style="font-family:arial, helvetica, sans-serif;font-size:13px">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0.001 for the full grid.</div><div style="font-family:arial, helvetica, sans-serif;font-size:13px"><br></div><div style="font-family:arial, helvetica, sans-serif;font-size:13px"><br></div><div style="font-family:arial, helvetica, sans-serif;font-size:13px">Date: Thu, 25
 Nov 2010 02:24:52 -0800 (PST)<br>From: khalid ashraf &lt;<a ymailto="mailto:khalid_eee@yahoo.com" href="mailto:khalid_eee@yahoo.com">khalid_eee@yahoo.com</a>&gt;<br>Subject: [petsc-users] DAGetCorners; xs,ys,zs return 0 for all the<br>&nbsp;&nbsp;&nbsp; processors<br>To: <a ymailto="mailto:petsc-users@mcs.anl.gov" href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a><br>Message-ID: &lt;<a ymailto="mailto:588844.78157.qm@web112619.mail.gq1.yahoo.com" href="mailto:588844.78157.qm@web112619.mail.gq1.yahoo.com">588844.78157.qm@web112619.mail.gq1.yahoo.com</a>&gt;<br>Content-Type: text/plain; charset="us-ascii"<br><br>Here is the call to DA creation:<br><br>ierr = <br>DACreate3d(PETSC_COMM_WORLD,DA_NONPERIODIC,DA_STENCIL_BOX,appctx.l,appctx.m,appctx.n,<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br> PETSC_DECIDE,PETSC_DECIDE,PETSC_DECIDE,1,1,PETSC_NULL,PETSC_NULL,PETSC_NULL,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &amp;appctx.da);CHKERRQ(ierr);<br><br>Khalid<br><br><br>&nbsp; &nbsp; &nbsp; <br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br><span>URL: &lt;<a target="_blank" href="http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20101125/d0590ec8/attachment-0001.htm">http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20101125/d0590ec8/attachment-0001.htm</a>&gt;</span><br><br>------------------------------<br><br>Message: 2<br>Date: Thu, 25 Nov 2010 11:35:43 +0100<br>From: Jed Brown &lt;<a ymailto="mailto:jed@59A2.org" href="mailto:jed@59A2.org">jed@59A2.org</a>&gt;<br>Subject: Re: [petsc-users] DAGetCorners;&nbsp;&nbsp;&nbsp; xs,ys,zs return 0 for all the<br>&nbsp;&nbsp;&nbsp; processors<br>To: PETSc users list &lt;<a ymailto="mailto:petsc-users@mcs.anl.gov" href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>&gt;<br>Message-ID:<br>&nbsp;&nbsp;&nbsp; &lt;AANLkTineq3bTG=<a
 ymailto="mailto:iRsjkdoY2ZhZ9ac7r8vBmSUqEpOvu5@mail.gmail.com" href="mailto:iRsjkdoY2ZhZ9ac7r8vBmSUqEpOvu5@mail.gmail.com">iRsjkdoY2ZhZ9ac7r8vBmSUqEpOvu5@mail.gmail.com</a>&gt;<br>Content-Type: text/plain; charset="utf-8"<br><br>On Thu, Nov 25, 2010 at 11:24, khalid ashraf &lt;<a ymailto="mailto:khalid_eee@yahoo.com" href="mailto:khalid_eee@yahoo.com">khalid_eee@yahoo.com</a>&gt; wrote:<br><br>&gt; Here is the call to DA creation:<br>&gt;<br>&gt; ierr =<br>&gt; DACreate3d(PETSC_COMM_WORLD,DA_NONPERIODIC,DA_STENCIL_BOX,appctx.l,appctx.m,appctx.n,<br>&gt;<br>&gt;&nbsp; PETSC_DECIDE,PETSC_DECIDE,PETSC_DECIDE,1,1,PETSC_NULL,PETSC_NULL,PETSC_NULL,<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &amp;appctx.da);CHKERRQ(ierr);<br>&gt;<br><br>If you created the DA as above and then call<br><br>&nbsp; DAGetCorners(appctx.da,&amp;xs,&amp;ys,&amp;zs,&amp;xm,&amp;ym,&amp;zm);<br><br>then only on rank=0 will xs,ys,zs all be equal to
 zero.&nbsp; Your other message<br>about PETSc versus natural ordering indicates that this is working<br>correctly.&nbsp; Is it working now?&nbsp; If not, please send more context, including<br>whatever code you are using to print output.<br><br>Jed<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br><span>URL: &lt;<a target="_blank" href="http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20101125/6da538a3/attachment-0001.htm">http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20101125/6da538a3/attachment-0001.htm</a>&gt;</span><br><br>------------------------------<br><br>_______________________________________________<br>petsc-users mailing list<br><a ymailto="mailto:petsc-users@mcs.anl.gov" href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a><br><a href="https://lists.mcs.anl.gov/mailman/listinfo/petsc-users"
 target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/petsc-users</a><br><br><br>End of petsc-users Digest, Vol 23, Issue 28<br>*******************************************<br></div></div><div style="position:fixed"></div>


</div><br>

      </body></html>