[petsc-users] force KSP to perform at least a single iteration

Rolf Kuiper kuiper at mpia.de
Sun Jul 27 10:45:59 CDT 2014


Dear PETSc users and developers,

is there an easy way to set a minimum iteration number to a KSP context (such as a maximum iteration number in KSPSetTolerances())?

I don't know, if the following explanation is useful, but I will try to give an example usage here:
I need this to e.g. solve a linear system of equations several times (as the physical system proceeds in time); during a single call / timestep, the system, might not change stronger than the RTOL in use, but in the long-run (several hundreds to thousands of calls), the system will actually change by several RTOL; nonetheless, the default KSP solver stops without doing any iteration (= 0), i.e. the system does not change at all.

I have the feeling that it might be possible by using my own convergence test with KSPSetConvergenceTest(), but I am not 100% sure and would prefer to go with the standard PETSc convergence test, just adding the minimum iteration number.

Thanks a lot,
Rolf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140727/2b9cecf7/attachment.html>


More information about the petsc-users mailing list