[petsc-users] confusion about VecGetArray on a sequential vec
丁老师
ztdepyahoo at 163.com
Thu Aug 1 05:11:39 CDT 2013
I create a sequential vec seqx, and i get it value with VecGetArrary, since seqx is created only in process 0, why every process can output the value of the seqx.
VecCreateSeq(PETSC_COMM_SELF,5,&seqx);
VecView(seqx,PETSC_VIEWER_STDOUT_WORLD);
double *seqarry;
VecGetArray(seqx,&seqarry);
for(int i=0;i<n;i++)
cout<<MyRank<<" seqarry "<<seqarry[i]<<endl;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130801/ca365bc1/attachment.html>
More information about the petsc-users
mailing list