<br><br>Forget about the part below, btw. Clearly, in many cases for the implicit methods it is necessary to preserve the solution at the previous time until we're done finding the new solution.<br><br>--Kai<br><br><br>
<div class="gmail_quote">On Sat, May 16, 2009 at 12:07 AM, Kai Germaschewski <span dir="ltr"><<a href="mailto:kai.germaschewski@unh.edu">kai.germaschewski@unh.edu</a>></span> wrote:<br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><div class="gmail_quote"><div>Obviously for methods where steps may fail and will be retried, it's necessary to preserve the old solution, however<br>many schemes just call KSPSolve(.., update) or SNESSolve(..., update). In a linear method, I suppose by definition the operator does not depend on the current "sol". In a nonlinear problem, it will, however I suppose that SNESSolve() wouldn't update the solution vector until the very end, or am I missing something?<br>

<br>Point being, all these VecCopy()'s aren't really necessary and actually end up making the code a bit more complicated than needs be, and obviously aren't helping performance. (For implicit methods, those copies will generally be negligible, but for the explicit ones (euler eg), that's not so clear...)<br>
<font color="#888888">
<br>--Kai<br><br></font></div></div><div><div></div><div class="h5">-- <br>Kai Germaschewski<br>Assistant Professor, Dept of Physics / Space Science Center<br>University of New Hampshire, Durham, NH 03824<br>office: Morse Hall 245F<br>
phone:  +1-603-862-2912<br>
fax: +1-603-862-2771<br><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Kai Germaschewski<br>Assistant Professor, Dept of Physics / Space Science Center<br>University of New Hampshire, Durham, NH 03824<br>office: Morse Hall 245F<br>
phone:  +1-603-862-2912<br>fax: +1-603-862-2771<br><br>