[petsc-users] Getting global indices of vector distributed among different processes.

Venugopal, Vysakh (venugovh) venugovh at mail.uc.edu
Wed Jan 4 09:47:41 CST 2023


Hello,

Is there a way to get the global indices from a vector created from DMCreateGlobalVector? Example:

If global vector V (of size 10) has indices {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} and they are divided into 2 processes. Is there a way to get information such as (process 1: {0,1,2,3,4}, process 2: {5,6,7,8,9})?

The reason I need this information is that I need to query the values of a different vector Q of size 10 and place those values in V. Example: Q(1) --- V(1) @ process 1, Q(7) - V(7) @ process 2, etc.. If there are smarter ways to do this, I am happy to pursue that.

Thank you,

Vysakh V.

---
Vysakh Venugopal
Ph.D. Candidate
Department of Mechanical Engineering
University of Cincinnati, Cincinnati, OH 45221-0072

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


More information about the petsc-users mailing list