DAVec and MPI Gather

Olivier Saut saut.olivier at wanadoo.fr
Mon Jul 23 06:47:38 CDT 2007


Hi all,

something is not very clear for me.
I use a DA to solve a diffusion equation on several processors.

The global vector containing the solution is created with
DACreateGlobalVector(da,&Sol);
VecDuplicate(Sol, sMemb); // RHS vector

// Local part of the matrix and RHS vector are computed

KSPSolve(ksp, sMemb, Sol);


At this stage, Sol is supposed to contained the solution.

Now for vizualisation, I need to get acces all the values of Sol.
As far as I understand, DAVecGetArray only gives acces to the local  
values of Sol.
Should I use MPI Gather to obtain the values from the other processors?

Thanks a lot,
                                                                         
                  - Olivier







More information about the petsc-users mailing list