You absolutely should not need to do an assembly after a VecSet. Please post a full reproducer that demonstrates the problem.
Barry > On Apr 25, 2025, at 1:23 PM, Derek Teaney via petsc-users > <petsc-users@mcs.anl.gov> wrote: > > Hi, > > I was under the (mistaken) impression that one does not need to due a > VecAssemblyBegin etc following a VecSet, e.g. > > VecSet(dn_local, 0.); > VecAssemblyBegin(dn_local) ; > VecAssemblyEnd(dn_local) ; > > Seems to give different results without the Assembly. > > Thanks for clarifying, > > Derek > > -- > ------------------------------------------------------------------------ > Derek Teaney > Professor and Graduate Program Director > Dept. of Physics & Astronomy > Stony Brook University > Stony Brook, NY 11794-3800 > Tel: (631) 632-4489 > Fax: (631) 632-9718 > e-mail: derek.tea...@stonybrook.edu <mailto:derek.tea...@stonybrook.edu> > ------------------------------------------------------------------------ >