[petsc-users] CHANGE OF ILU LEVEL DURING COMPUTATION
Frank Bramkamp
bramkamp at nsc.liu.se
Fri Sep 12 11:08:04 CDT 2025
Duar PETSC Team,
I have the following question.
During the runtime I would yo change the level of ILU fill in eg from to 1, and sometimes back to 0.
Is it sufficient simply to set in fortran
call PCFactorSetLevels(IMP_CTX%PC_METHOD,ILU_LEVELS,IERROR)
and petsc will see if it needs to change things and if it has to set up data structured again if the UILU fill in changes,
or do I have to destroy the previous preconditioner context and setup a completely new one again ?!
I typically set other parameter for ILU as well as
CALL PCFactorSetPivotInBlocks(IMP_CTX%PC_METHOD,PETSC_TRUE,IERROR)
CALL PCFactorSetAllowDiagonalFill(IMP_CTX%PC_METHOD,PETSC_TRUE,IERROR)
If I change the ILU fill in, would I have to set those again as well ?!
The problem is often to know the problem in advance how many iterations are needed and if it is worth to use eg ILU(1) over ILU(0).
If the number of iterations is low, then ILU(1) is a waste of time. Theerfore I want to have a winwod eg pf 10-15 nonlinear iterations where I store the
last GMRES iterations eg using ILU(0). Then I can determine an average and use this average as indicator. eg if the average irations are below eg 25 or 30 then
I keep ILU(0)m if more, ILU(1) could be used.
At least that is the idea to control the number of level a bit more dynamic to what I would try to do if just looking at the number of iterations it takes.
Maybe, later one can also use timings of PCSetup and PCAppply to see how much each section takes to refine the approach a bit.
Greetings, Frank Bramkamp
More information about the petsc-users
mailing list