[petsc-users] how to select values from certain positions of a vec from different process to process 0.

Barry Smith bsmith at mcs.anl.gov
Tue Jul 30 20:08:26 CDT 2013



  create an IS with the global indices you want on process 0 and a seq Vec of the same size,

  create an IS of size 0 on all the other processes and a seq Vec of the size zero on all other processes

  create a VecScatter using these IS, the global Vec and the seq Vec.

  use VecScatterBegin/End to send over the values.

   Barry


On Jul 30, 2013, at 6:37 PM, 丁老师 <ztdepyahoo at 163.com> wrote:

> 
> 
> 
> 
> 
> 
> 
> 
> 
> 



More information about the petsc-users mailing list