<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 </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 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<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: 0.001 for half of the grid</div><div style="font-family:arial, helvetica, sans-serif;font-size:13px"> -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"> 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 <<a ymailto="mailto:khalid_eee@yahoo.com" href="mailto:khalid_eee@yahoo.com">khalid_eee@yahoo.com</a>><br>Subject: [petsc-users] DAGetCorners; xs,ys,zs return 0 for all the<br> 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: <<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>><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> <br> PETSC_DECIDE,PETSC_DECIDE,PETSC_DECIDE,1,1,PETSC_NULL,PETSC_NULL,PETSC_NULL,<br>
&appctx.da);CHKERRQ(ierr);<br><br>Khalid<br><br><br> <br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br><span>URL: <<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>></span><br><br>------------------------------<br><br>Message: 2<br>Date: Thu, 25 Nov 2010 11:35:43 +0100<br>From: Jed Brown <<a ymailto="mailto:jed@59A2.org" href="mailto:jed@59A2.org">jed@59A2.org</a>><br>Subject: Re: [petsc-users] DAGetCorners; xs,ys,zs return 0 for all the<br> processors<br>To: PETSc users list <<a ymailto="mailto:petsc-users@mcs.anl.gov" href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>><br>Message-ID:<br> <AANLkTineq3bTG=<a
ymailto="mailto:iRsjkdoY2ZhZ9ac7r8vBmSUqEpOvu5@mail.gmail.com" href="mailto:iRsjkdoY2ZhZ9ac7r8vBmSUqEpOvu5@mail.gmail.com">iRsjkdoY2ZhZ9ac7r8vBmSUqEpOvu5@mail.gmail.com</a>><br>Content-Type: text/plain; charset="utf-8"<br><br>On Thu, Nov 25, 2010 at 11:24, khalid ashraf <<a ymailto="mailto:khalid_eee@yahoo.com" href="mailto:khalid_eee@yahoo.com">khalid_eee@yahoo.com</a>> wrote:<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>> PETSC_DECIDE,PETSC_DECIDE,PETSC_DECIDE,1,1,PETSC_NULL,PETSC_NULL,PETSC_NULL,<br>> &appctx.da);CHKERRQ(ierr);<br>><br><br>If you created the DA as above and then call<br><br> DAGetCorners(appctx.da,&xs,&ys,&zs,&xm,&ym,&zm);<br><br>then only on rank=0 will xs,ys,zs all be equal to
zero. Your other message<br>about PETSc versus natural ordering indicates that this is working<br>correctly. Is it working now? 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: <<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>></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>