<div class="gmail_extra">On Thu, Apr 26, 2012 at 11:10 AM, behzad baghapour <span dir="ltr"><<a href="mailto:behzad.baghapour@gmail.com" target="_blank">behzad.baghapour@gmail.com</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 class="gmail_extra">Here is my procedure:<br><br>Define:<br><br>KSP mon_ksp;<br>PC mon_pre;<br>.<br>.<br>.<br>if( res_n < 1e-1 && c_test == 0 )<br>
{<br> KSPGetPC ( mon_ksp, &mon_pre );
<br> ierr = PCFactorSetLevels( mon_pre, 4 ); CHKERRQ( ierr );<br></div></blockquote><div><br></div><div>Here you would have to PCReset(), set the type again, and set the options</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"><div class="gmail_extra"> KSPSetPC ( mon_ksp, mon_pre );<br> SNESSetKSP( snes, mon_ksp );
<br> ierr = SNESSetUp( snes ); CHKERRQ( ierr );<br> c_test = 1;
<br>}<br><br>and did get the error: "Object is in wrong state..." <br><br></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>
</div>