OK, thanks. Franck
----- Mail original ----- > De: "Matthew Knepley" <knep...@gmail.com> > À: "Franck Houssen" <franck.hous...@inria.fr> > Cc: "PETSc" <petsc-users@mcs.anl.gov>, "PETSc" <petsc-...@mcs.anl.gov> > Envoyé: Dimanche 21 Mai 2017 18:41:10 > Objet: Re: [petsc-users] Is xout always already zero'ed when being called > back on PCShellSetApply ? > On Sun, May 21, 2017 at 11:11 AM, Franck Houssen < franck.hous...@inria.fr > > wrote: > > When using > > http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCShellSetApply.html, > > do I have the guaranty that xout from " PetscErrorCode apply ( PC pc, Vec > > xin, Vec xout)" has always been previously filled with zeros ? > > > I may have to fill xout by blocks (I would += several possibly overlapping > > blocks: I need to make sure xout is first filled with zero to get the > > correct result). > > No, we do not initialize the output vector. Yo ucan call VecSet(xout, 0.0); > Thanks, > Matt > > Franck > > -- > 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 > http://www.caam.rice.edu/~mk51/