[petsc-users] Projection preconditioner as PCMG
Jed Brown
jedbrown at mcs.anl.gov
Thu Mar 8 13:16:35 CST 2012
On Thu, Mar 8, 2012 at 12:57, Abdul Hanan Sheikh <hanangul12 at yahoo.co.uk>wrote:
> I dont want to try snes, since my problem is linear,
>
Note that you can still use SNES for linear problems. (I prefer the
interface, you can choose -snes_type ksponly so there is no extra overhead,
but use whatever you like.)
> but I successfully applied the KSP
> preconditioned with PCMG (not kaskade, but multiplicative; for some
> reasons) .
> I make pre-smoother dummy by setting KSP_PRE context as PREONLY alongwith
> PCNONE.
>
You can just set the number of pre-smoothing steps to 0.
> CGC and post-smoother serves my purpose to apply preconditioner
> Prec = I - A*P*(A_H)^-1 * R with KSP_POST as RICHARDSON alongwith
> PCNONE.
>
Read my last message again. You either want the additive
Prec = I + C
(where C = P*A_H^{-1}*R is the coarse solve) or the multiplicative
Prec = C + S (I - A C)
perhaps with S = I (or some scaling factor). I don't think your definition
of Prec makes sense or is the operation that you intend to be applying.
> I hope PCNONE make smoother S = I in the framework you suggested earlier
> i.e.
> C b + S (b - A C b)~~~~~~ where C is read as CGC.
> It seems working well with levels 2, but when I force RICHARDSON_max_it 0.
> To my understanding, it should work with RICHARDSON_max_it = 1;
>
Read through my last message again. I explained that this does not work and
that it is caused by the destabilizing effect of the extra multiply without
a smoother. You can fix it for easy problems with
-mg_levels_ksp_richardson_self_scale.
> What if I want to approximate my all coarse matrices with any Krylov
> iteration ?
>
The methods on each level are independent, you can set them with
-mg_coarse_ksp_type gmres -mg_levels_1_ksp_type cg -mg_levels_1_ksp_max_it
100 -mg_levels_2_ksp_type minres ...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120308/ee37ca11/attachment-0001.htm>
More information about the petsc-users
mailing list