On Tue, Jan 3, 2023 at 4:01 PM Venugopal, Vysakh (venugovh) via petsc-users <[email protected]> wrote:
> Hi, > > > > Suppose I have a vector āVā of global size m divided into 2 processes > (making local size m/2). This vector V is derived from a DM object using > DMCreateGlobalVector. > > > > I am using VecScatterCreateToAll to get a vector V_SEQ. > V_SEQ on each process has a size m > > > Is there a way to distribute the V_SEQ to V (where each V has a local size > of m/2)? > I assume you want to sum V_SEQ into V, since each entry of V will receive two contributions from the two V_SEQ. If that's the case, you could use VecScatterBegin/End(toall, V_SEQ, V, ADD_VALUES, SCATTER_REVERSE), where 'toall' is the VecScatter you created with VecScatterCreateToAll. > > > I am happy to explain if my question is not clear. Thank you! > > > > --- > > Vysakh Venugopal > > Ph.D. Candidate > > Department of Mechanical Engineering > > University of Cincinnati, Cincinnati, OH 45221-0072 > > >
