[petsc-users] Copy entries of unequal size vector

khalid ashraf khalid_eee at yahoo.com
Sat Jun 4 05:01:41 CDT 2011


Hi,
I want to copy 3 parallel vectors of size N into a vector of size 3N where the 3 
vector entries goes as 
dest(3*i)=vec1(i);
dest(1+3*i)=vec2(i);
dest(2+3*i)=vec3(i);

Could you please suggest what would be the most efficient way to copy for 
parallel performance. 

I guess it would be best if all the vectors have the same parallel layout. Is 
there a way to make sure that the vectors vec1(N elements) and dest(3N elements) 
have similar parallel layout ? 

Thanks in advance.

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


More information about the petsc-users mailing list