<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div>OK, thanks.<br></div><div><br></div><div>Franck<br></div><div><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>De: </b>"Matthew Knepley" <knepley@gmail.com><br><b>À: </b>"Franck Houssen" <franck.houssen@inria.fr><br><b>Cc: </b>"PETSc" <petsc-users@mcs.anl.gov>, "PETSc" <petsc-dev@mcs.anl.gov><br><b>Envoyé: </b>Dimanche 21 Mai 2017 18:41:10<br><b>Objet: </b>Re: [petsc-users] Is xout always already zero'ed when being called back on PCShellSetApply ?<br><div><br></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, May 21, 2017 at 11:11 AM, Franck Houssen <span dir="ltr"><<a href="mailto:franck.houssen@inria.fr" target="_blank" data-mce-href="mailto:franck.houssen@inria.fr">franck.houssen@inria.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex" data-mce-style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000" data-mce-style="font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000;"><div>When using <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCShellSetApply.html," target="_blank" data-mce-href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCShellSetApply.html,">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCShellSetApply.html,</a> do I have the guaranty that xout from "<a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscErrorCode.html#PetscErrorCode" target="_blank" data-mce-href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</a> apply (<a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PC.html#PC" target="_blank" data-mce-href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PC.html#PC">PC</a> pc,<a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/Vec.html#Vec" target="_blank" data-mce-href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/Vec.html#Vec">Vec</a> xin,<a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/Vec.html#Vec" target="_blank" data-mce-href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/Vec.html#Vec">Vec</a> xout)" has always been previously filled with zeros ?<br></div><div>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).<span class="HOEnZb"><span style="color: #888888;" data-mce-style="color: #888888;" color="#888888"><br></span></span></div><div><br></div></div></div></blockquote><div><br></div><div>No, we do not initialize the output vector. Yo ucan call VecSet(xout, 0.0);</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex" data-mce-style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000" data-mce-style="font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000;"><div><span style="font-size:12pt" data-mce-style="font-size: 12pt;">Franck</span><br></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div class="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div class="gmail_signature"><br></div><div class="gmail_signature"><a href="http://www.caam.rice.edu/~mk51/" target="_blank" data-mce-href="http://www.caam.rice.edu/~mk51/">http://www.caam.rice.edu/~mk51/</a><br></div></div></div></div></div></blockquote><div><br></div></div></body></html>