[petsc-users] Getting correct local size using VecScatterCreateToAll

Venugopal, Vysakh (venugovh) venugovh at mail.uc.edu
Fri Jan 6 17:22:40 CST 2023


Hello,

I have created a global vector V using DMCreateGlobalVector of size m. For n processes, the local size of V is m/n.

Subsequently, I am using VecScatterCreateToAll to get a sequential copy of the V, let's call it V_seq of local size m. It passes through a function and outputs the vector V_seq_hat (of local size m).

Is there a way for me to substitute the values of V_seq_hat (at the correct indices) to the original V (with local size m/n)?

When I use VecScatterCreateToAll (with SCATTER_REVERSE), I am getting a vector V with new values from V_seq_hat but with local size m. This is causing issues in the rest of my code where the size of V needs to be m/n.

Any help would be really appreciated!

Thanks,

---
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/20230106/42da3171/attachment-0001.html>


More information about the petsc-users mailing list