[petsc-dev] [petsc-users] Is xout always already zero'ed when being called back on PCShellSetApply ?

Franck Houssen franck.houssen at inria.fr
Mon May 22 02:23:52 CDT 2017


OK, thanks. 

Franck 

----- Mail original -----

> De: "Matthew Knepley" <knepley at gmail.com>
> À: "Franck Houssen" <franck.houssen at inria.fr>
> Cc: "PETSc" <petsc-users at mcs.anl.gov>, "PETSc" <petsc-dev at 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.houssen at 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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170522/16e6b4fe/attachment.html>


More information about the petsc-dev mailing list