[petsc-users] How to zero entries in a vec, including ghosts?
Eric Chamberland
Eric.Chamberland at giref.ulaval.ca
Thu Dec 1 08:48:13 CST 2016
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?
Thanks,
Eric
More information about the petsc-users
mailing list