[petsc-users] global indices of a vector in each process

Venugopal, Vysakh (venugovh) venugovh at mail.uc.edu
Mon Jan 30 09:36:44 CST 2023


Hello,

I am using a DMCreateGlobalVector to create a vector V. If V is divided into m processes, is there a way to get the global indices of V assigned to each process?

For example: V = [10, 20, 30, 40, 50, 60, 70, 80].
If MPI process 0 has [10, 40, 50, 60] and process 1 has [20, 30, 70, 80], is it possible to get the indices for process 0 as [0,3,4,5] and process 1 as [1,2,6,7]?

Thanks,

Vysakh
---
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/20230130/98895d45/attachment.html>


More information about the petsc-users mailing list