[petsc-users] Scheduled Relaxation Jacobi method

Barry Smith bsmith at mcs.anl.gov
Tue Jul 26 20:40:33 CDT 2016


> On Jul 26, 2016, at 11:27 AM, JC <loiseau.jc at gmail.com> wrote:
> 
> Hej,
> 
> I have been using a very simple Scheduled Relaxation Jacobi (SRJ) method for tests purpose in one of my code, and would now like to implement into the big version that uses PETSc. So far, I have figured that I can use the weighted Jacobi method since it is nothing but a Jacobi-preconditioned Richardson. While in the weighted Jacobi, the relaxation weight omega is fixed, in the SRJ method, the value of the relaxation factor depends on the grid size and the iteration. Is there any simple way to implement such a iteration-varying relaxation weight given that I have text files with their appropriate values?

   The dependence on grid size is easy. You just call KSPRichardsonSetScale(). By depends on the iteration do you mean the linear iteration, as in the first iteration you use .1 then in the second you use .2 etc?  To do this use KSPSetMonitor() and have your monitor routine call KSPRichardsonSetScale() with the value you like which can depend on the iteration.

   Barry

> 
> Thanks a lot.
> JC



More information about the petsc-users mailing list