[petsc-users] Union of sequential vecs

Karthikeyan Chockalingam - STFC UKRI karthikeyan.chockalingam at stfc.ac.uk
Fri Dec 9 13:28:09 CST 2022


Hi,

I want to take the union of a set of sequential vectors, each living in a different processor.

Say,
Vec_Seq1 = {2,5,7}
Vec_Seq2 = {5,8,10,11}
Vec_Seq3 = {5,2,12}.

Finally, get the union of all them Vec = {2,5,7,8,10,11,12}.

I initially wanted to create a parallel vector and insert the (sequential vector) values but I do not know, to which index to insert the values to. But I do know the total size of Vec (which in this case is 7).

Any help is much appreciated.

Kind regards,
Karthik.




This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete this email from your system. UK Research and Innovation (UKRI) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before opening the attachments. UKRI does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses.

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


More information about the petsc-users mailing list