<div class="gmail_quote">On Fri, Aug 17, 2012 at 7:36 AM, Alexander Grayver <span dir="ltr"><<a href="mailto:agrayver@gfz-potsdam.de" target="_blank">agrayver@gfz-potsdam.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">I've seen this, but I'm not sure is it fits me.<br>
<br>
What I would like to do is very simple: every N iterations I want to
take current solution vector <b>x</b>_i from KSP and calculate:<br>
<b>x</b>_i = <b>x</b>_i + <b>c</b>,<br>
where <b>c</b> is a correction vector.</div></blockquote><div><br></div><div>How do you want to compute c?</div><div><br></div><div>For a general KSP, this is not allowed because the preconditioner must be constant. (You can do it anyway by checking the iteration number in your PCShell, but it won't converge.) You can play these games with a flexible method like FGMRES, for which you can also do an inner-outer, e.g.</div>
<div><br></div><div>-ksp_type fgmres -pc_type composite -pc_composite_type multiplicative -pc_composite_pcs ksp,shell -sub_0_ksp_ksp_type tfqmr -sub_0_ksp_ksp_max_it 10 -sub_0_ksp_pc_type ilu</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> I want to be able to apply
other preconditioners in a usual way. <br>
<br>
Is it possible?</div></blockquote></div><br>