<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.6.6">
</HEAD>
<BODY>
Hi,<BR>
<BR>
I am performing a series of solves inside a loop. The matrix for each solve changes but not enough to justify a rebuilt of the PC at each solve.<BR>
Therefore I am using  KSPSetReusePreconditioner to avoid rebuilding unless necessary. The solver is CG + MG with a custom  PC at the coarse level.<BR>
If KSP is not updated each time, everything works as it is supposed to. <BR>
When instead I allow the default PETSc  behavior, i.e. updating PC every time the matrix changes, the coarse level KSP , initially set to PREONLY, is changed into GMRES <BR>
after the first solve. I am not sure where the problem lies (my PC or PETSc), so I would like to have your opinion on this.<BR>
I attached the ksp_view for the 2 successive solve and the options stack.<BR>
<BR>
Thanks for your help,<BR>
Michel<BR>
<BR>
<BR>
<BR>
</BODY>
</HTML>