[petsc-users] Projection preconditioner as PCMG

Jed Brown jedbrown at mcs.anl.gov
Thu Mar 8 14:09:10 CST 2012


On Thu, Mar 8, 2012 at 13:59, Abdul Hanan Sheikh <hanangul12 at yahoo.co.uk>wrote:

> And last one is more appreciated;
> -mg_levels_1_ksp_type cg can this be written in routine ? yes, with
> KSPSetType() but which ksp-context ? ksp_pre ?
>

That is the command line option, see PCMGGetSmoother() or
PCMGGetSmootherUp() to get the KSP for a level from code.


>
> My Preconditioner:
> I  need a preconditioner which read as: Prec = \lambda_max*C + (I - AC) ,
> [C = CGC] where (I - AC) deflates spectrum to zero,
> and this part \lambda_max *C then shifts spectrum to \lambda_max (which
> is always 1 in my case) .
>

You can always multiply preconditioners by a arbitrary constant, so
multiply through by S = 1/\lambda_max to get the standard form

Prec = C + S(I - AC)


> Dont I get my Prec by multiplicative combination of CGC with post smoother
> S = Identity  using mg_type_multiplicative ?


If we put in S = I, we get my

Prec = C + I - AC

which is not equal to your stated

Prec = I - AC

unless C = 0 which would make Prec = I.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120308/d513115e/attachment.htm>


More information about the petsc-users mailing list