Hey, Barry<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Lagging the preconditioner does NOT mean applying the preconditioner every p non-linear iterations. It means RECOMPUTING the preconditioner (with LU that means doing a new LU numerical factorization) every p nonlinear iterations. The preconditioner is still APPLIED at every iteration of the Krylov method.<br>
</blockquote><div><br>Thanks for the clarification :D<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Within the linear solve inside Newton there is never a recomputation of the preconditioner (because the matrix stays the same inside the linear solve) so lagging inside the linear solve doesn't make sense.<br>
</blockquote><div><br>The thing is, as far as I know, that I do have to "recompute" my matrix-free preconditioner every linear iteration inside Newton's method because the input vector changes throughtout the execution of the Krylov solver.<br>
<br>Let me give you a clearer and brief explanation of how the preconditioner works. Choosing left preconditioning, we have M^(-1)J(x)s = -M^(-1)F(x), where J(x) = L + D + U and M = (D + wU)^(-1)D(D + wL)^(-1). So, as this is a matrix-free preconditioner, everytime there is a jacobian-vector product J(x)v, PETSc uses the finite-difference approximation (F(x + hM^(-1)v) - F(x)) / h, right? So, the PCApply routine is called every linear iteration. My intention is to make that call periodically in hopes of lowering the runtime. Doesn't that make sense?<br>
</div>Rafael<br></div>