On Mon, Oct 31, 2011 at 10:58 AM, behzad baghapour <span dir="ltr">&lt;<a href="mailto:behzad.baghapour@gmail.com">behzad.baghapour@gmail.com</a>&gt;</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;">
I did it but received this Error when I want to change the level of fill for PCILU:<br></blockquote><div><br></div><div>Right, you would have to recreate the preconditioner. The SetType() would not work since</div><div>you did not actually change the type.</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;">[0]PETSC ERROR: --------------------- Error Message ------------------------------------<br>
[0]PETSC ERROR: Object is in wrong state!<br>
[0]PETSC ERROR: Cannot change levels after use!<br>[0]PETSC ERROR: ------------------------------------------------------------------------<div><div></div><div class="h5"><br><br><br><br><div class="gmail_quote">On Mon, Oct 31, 2011 at 2:19 PM, Matthew Knepley <span dir="ltr">&lt;<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Mon, Oct 31, 2011 at 8:55 AM, behzad baghapour <span dir="ltr">&lt;<a href="mailto:behzad.baghapour@gmail.com" target="_blank">behzad.baghapour@gmail.com</a>&gt;</span> wrote:<br>

</div><div class="gmail_quote"><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear all,<br><br>I&#39;m using KSP iteration (for now) to solve my nonlinear problem and handling Newton Iterations manually. Here I want to change the PC method from some specified KSP iteration. How should I do it correctly in Petsc?<br>


</blockquote><div><br></div></div><div>Call PCSetType() and then KSPSetOperators() again in your loop</div><div><br></div><div>   Matt</div><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Thanks, B.B.<br clear="all"><font color="#888888"><br>-- <br>==================================<br>Behzad Baghapour<br>Ph.D. Candidate, Mechecanical Engineering<br>University of Tehran, Tehran, Iran<br><a href="https://sites.google.com/site/behzadbaghapour" target="_blank">https://sites.google.com/site/behzadbaghapour</a><br>



Fax: 0098-21-88020741<br>==================================<br><br>
</font></blockquote></div></div><font color="#888888"><br><br clear="all"><div><br></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>
</font></blockquote></div><br><br clear="all"><br>-- <br>==================================<br>Behzad Baghapour<br>Ph.D. Candidate, Mechecanical Engineering<br>University of Tehran, Tehran, Iran<br><a href="https://sites.google.com/site/behzadbaghapour" target="_blank">https://sites.google.com/site/behzadbaghapour</a><br>

Fax: 0098-21-88020741<br>==================================<br><br>
</div></div></blockquote></div><br><br clear="all"><div><br></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>