Re: 回复: about combining the GMRES and smooth methods
Barry Smith
bsmith at mcs.anl.gov
Sun Jan 28 18:37:18 CST 2007
Lisandro,
Good point. One could use (always run with -ksp_view to insure it is doing what you think).
-pc_type composite -ksp_type richardson -pc_composite_pcs ksp,sor -sub_0_ksp_ksp_max_it 5
This would run 5 iterations of the default KSP and PC followed by a sweep of SSOR followed by
5 iterations of the KSP etc. etc.
Using -ksp_type fgmres will use the above two steps (KSP of 5 iterations plus SOR) as a preconditioner
for flexible GMRES.
Adding -sub_1_pc_sor_its 2 would have it do two sweeps of SSOR instead of 1.
etc. etc. There are unlimited possibilities, one can nest the solvers as much as they like, no coding needed.
Have fun,
Barry
On Sun, 28 Jan 2007, Lisandro Dalcin wrote:
> On 1/28/07, jiaxun hou <jiaxun_hou at yahoo.com.cn> wrote:
> >
> > But I already had another preconditioner. I want to study the behave of the
> > smooth method in the GMRES with my preconditioner. How can I do?
> > Thanks!
>
> So perhaps it is better to use a composite preconditioner, calling
> PCCreate(comm,&pc) and next PCSetType(pc, PCCOMPOSITE), and finally
> add your preconditioner followed by the smoother...
>
> I think your original approach was wrong, if you look at GMREScycle(),
> you will see that this routine applies the PC inside each cycle.
>
>
>
More information about the petsc-users
mailing list