> On Sep 29, 2017, at 8:26 AM, Xiangdong <[email protected]> wrote:
>
> Hi Barry,
>
> Can you point me the documentation for understanding these iteration
> patterns? Thanks a lot.
They are explained implicitly in the documentation for the pieces but I admit
it may not be clear.
Case 1:
Plain GMRES, prints the preconditioned residual at each iteration by
default. The operator is just application by A
Case 2:
The operator is multiply by A, the preconditioner is apply the identity,
compute the residual, update the solution by the residual (because the second
inner preconditioner is identity). The preconditioner is not the same as in
case 1 because of the computation of the residual inside the preconditioner and
the update of the solution.
Case 3:
Same preconditioner as 2 but since the preconditioner is not the identity
the unpreconditioned norm is different than the preconditioned norm hence it
prints something different when you request the unpreconditioned norm.
Barry
>
> Best,
> Xiangdong
>
> On Fri, Sep 29, 2017 at 11:24 AM, Barry Smith <[email protected]> wrote:
>
> They are all different iteration patterns. They definitely should present
> different residual results
>
>
> > On Sep 29, 2017, at 8:19 AM, Xiangdong <[email protected]> wrote:
> >
> > Hello everyone,
> >
> > I have a questions about residuals reported in pc_composite. For the
> > examples in petsc-3.7.6/src/ksp/ksp/examples/tutorials/ex1.c, I found that
> > when I use these three options:
> >
> > 1) -pc_type none
> > 2) -pc_type composite -pc_composite_pcs none,none -pc_composite_type
> > multiplicative
> > 3) -pc_type composite -pc_composite_pcs none,none -pc_composite_type
> > multiplicative -ksp_norm_type unpreconditioned
> >
> > as shown below, it reported different KSP residuals. Given that I use the
> > identity preconditioner (with multiplicative), why does the residual vary
> > for different options?
> >
> > Thanks.
> >
> > Best,
> > Xiangdong
> >
> > mpirun -np 1 ./extest -ksp_monitor -pc_type none
> >
> > 0 KSP Residual norm 1.414213562373e+00
> > 1 KSP Residual norm 6.324555320337e-01
> > 2 KSP Residual norm 3.779644730092e-01
> > 3 KSP Residual norm 2.581988897472e-01
> > 4 KSP Residual norm 1.906925178491e-01
> > 5 KSP Residual norm 1.616509124176e-15
> >
> > mpirun -np 1 ./extest -ksp_monitor -pc_type composite -pc_composite_pcs
> > none,none -pc_composite_type multiplicative
> >
> > 0 KSP Residual norm 1.414213562373e+00
> > 1 KSP Residual norm 1.176696810829e+00
> > 2 KSP Residual norm 1.096908636191e+00
> > 3 KSP Residual norm 4.389821446437e-01
> > 4 KSP Residual norm 2.088364906576e-01
> > 5 KSP Residual norm 2.725851091482e-13
> >
> > mpirun -np 1 ./extest -ksp_monitor -pc_type composite -pc_composite_pcs
> > none,none -pc_composite_type multiplicative -ksp_norm_type unpreconditioned
> > 0 KSP Residual norm 1.414213562373e+00
> > 1 KSP Residual norm 1.290994448736e+00
> > 2 KSP Residual norm 1.249516035344e+00
> > 3 KSP Residual norm 4.836894336642e-01
> > 4 KSP Residual norm 1.467306491390e-01
> > 5 KSP Residual norm 9.881776494390e-14
>
>