On Wed, Jun 30, 2021 at 6:49 AM Peder Jørgensgaard Olesen via petsc-users <petsc-users@mcs.anl.gov> wrote:

Hello


I have a parallel vector, and I'd like to copy its data to a sequential vector located on a given process that is not necessarily the 0th process, so using VecScatterCreateToZero wouldn't do here.


How might one approach this?

The function is very short: https://www.mcs.anl.gov/petsc/petsc-current/src/vec/is/sf/interface/vscat.c.html#VecScatterCreateToZero
Just go in and replace '0' by the rank you want.

  Thanks,

     Matt 

Med venlig hilsen / Best Regards


Peder Jørgensgaard Olesen

PhD Student, Turbulence Research Lab

Dept. of Mechanical Engineering

Technical University of Denmark

Koppels Allé

Bygning 403, Rum 105

DK-2800 Kgs. Lyngby



--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener