<p>I think I get it now. Thanks a lot.</p>
<div class="gmail_quote">On Nov 6, 2011 11:06 PM, "Matthew Knepley" <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Sun, Nov 6, 2011 at 9:56 PM, Dominik Szczerba <span dir="ltr"><<a href="mailto:dominik@itis.ethz.ch" target="_blank">dominik@itis.ethz.ch</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div></div><div>On Sun, Nov 6, 2011 at 10:40 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br>
> On Sun, Nov 6, 2011 at 9:34 PM, Dominik Szczerba <<a href="mailto:dominik@itis.ethz.ch" target="_blank">dominik@itis.ethz.ch</a>><br>
> wrote:<br>
>><br>
>> On Sun, Nov 6, 2011 at 6:59 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br>
>> > On Sun, Nov 6, 2011 at 5:52 PM, Dominik Szczerba <<a href="mailto:dominik@itis.ethz.ch" target="_blank">dominik@itis.ethz.ch</a>><br>
>> > wrote:<br>
>> >><br>
>> >> >>> I want to start small by porting a very simple code using fixed<br>
>> >> >>> point<br>
>> >> >>> iterations as follows: A(x)x = b(x) is approximated as A(x0)x =<br>
>> >> >>> b(x0),<br>
>> >> >>> then solved by KSP for x, then x0 is updated to x, then repeat<br>
>> >> >>> until<br>
>> >> >>> convergence.<br>
>> >> ><br>
>> >> > Run the usual "Newton" methods with A(x) in place of the true<br>
>> >> > Jacobian.<br>
>> >><br>
>> >> When I substitute A(x) into eq. 5.2 I get:<br>
>> >><br>
>> >> A(x) dx = -F(x) (1)<br>
>> >> A(x) dx = -A(x) x + b(x) (2)<br>
>> >> A(x) dx + A(x) x = b(x) (3)<br>
>> >> A(x) (x+dx) = b(x) (4)<br>
>> >><br>
>> >> My questions:<br>
>> >><br>
>> >> * Will the procedure somehow optimally group the two A(x) terms into<br>
>> >> one, as in 3-4? This requires knowledge, will this be efficiently<br>
>> >> handled?<br>
>> ><br>
>> > There is no grouping. You solve for dx and do a vector addition.<br>
>> ><br>
>> >><br>
>> >> * I am solving for x+dx, while eq. 5.3 solves for dx. Is this, and<br>
>> >> how, correctly handled? Should I somehow disable the update myself?<br>
>> ><br>
>> > Do not do any update yourself, just give the correct A at each iteration<br>
>> > in<br>
>> > your FormJacobian routine.<br>
>> > Matt<br>
>><br>
>> OK, no manual update, this is clear now. What is still not clear is<br>
>> that by substituting A for F' I arrive at an equation in x+dx (my eq.<br>
>> 4), and not dx (Petsc eq. 5.3)...<br>
><br>
> Newton's equation is for dx. Then you add that to x to get the next guess.<br>
> This<br>
> is described in any book on numerical analysis, e.g. Henrici.<br>
> Matt<br>
<br>
</div></div>I understand that, but I am asking something else... when taking F' =<br>
A I arrive at an equation in x+dx, which is not Newton equation. What<br>
is wrong in this picture?</blockquote><div><br></div><div>Keep the residual on the rhs, not b</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">
<font color="#888888"><br>
Dominik</font></blockquote></div>-- <br>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<br>
</blockquote></div>