On Thu, Dec 1, 2016 at 8:48 AM, Eric Chamberland < eric.chamberl...@giref.ulaval.ca> wrote:
> Hi, > > I try to find how to zeros all vec entries, including ghosts, without > doing any communications... > > Since VecSet does not modify ghost values, we can do > > VecGhostUpdateBegin(v,INSERT_VALUES,SCATTER_FORWARD); > VecGhostUpdateEnd(v,INSERT_VALUES,SCATTER_FORWARD); > > But that is somewhat "heavy" just to put zeros in a vec on all processes... > > Shouldn't VecZeroEntries be the function that should do the work correctly? > How about VecGhostGetLocalForm(x,&xlocal); VecZeroEntries(xlocal); VecGhostRestoreLocalForm(x,&xlocal); Thanks, Matt > Thanks, > > Eric > -- 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