[petsc-users] A question of VecSetValues

Yonghui lyh03259.aps at gmail.com
Fri Feb 15 10:34:56 CST 2013


Dear PESTc users,

 

I don't understand VecSetValues very well. I compiled ex2 and run with
mpiexec -n 3. I got result like this:

 

Vector Object: 3 MPI processes

  type: mpi

Process [0]

4

Process [1]

4

4

Process [2]

4

3

2

 

Here is how I am comfused:

RANK 0:

do 100 i=0,0

         call VecSetValues(x,1,i,1,ADD_VALUES,ierr)

100  continue

 

RANK 1:

do 100 i=0,1

         call VecSetValues(x,1,i,1,ADD_VALUES,ierr)

100  continue

 

RANK 2:

do 100 i=0,2

         call VecSetValues(x,1,i,1,ADD_VALUES,ierr)

100  continue

 

I don't see any clue for getting the result above. Please show me how it
works! Thanks.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130215/8f031c5f/attachment-0001.html>


More information about the petsc-users mailing list