[petsc-users] DAGetCorners; xs,ys,zs return 0 for all the processors

khalid ashraf khalid_eee at yahoo.com
Thu Nov 25 02:11:06 CST 2010

     I am having trouble with writing to global vector indexes using DA . 
I am using the following function to get the starting point of a particular 

And then use it to iterate through the global indices. 
for (k=zs; k<zs+zm; k++) {
  for (j=ys; j<ys+ym; j++) {
  for (i=xs; i<xs+xm; i++){
if (i<(mx/2))  //left half of the grid
} else

But when I run this on multiple processors, xs, ys and zs come out to be 0 for 
all the processors.
I expected them to be the starting point of the global DA index in a particular 
 Could anyone tell me whats the problem ? Am I missing something here.
Thanks in advance.

Best regards.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20101125/4ad511b3/attachment.htm>

More information about the petsc-users mailing list