[petsc-users] how to speed up convergence

Konstantinos Kontzialis ckontzialis at lycos.com
Fri Nov 11 05:52:09 CST 2011


On 11/10/2011 08:00 PM, petsc-users-request at mcs.anl.gov wrote:
> how to speed up convergence
Dear Jed,

1. I'm consistent now with the use of PetscsScalar in my code. I was 
not!!!!!

2. mat_fd_type ds works better now. Running with:

mpiexec -n 8 ./hoac cylinder -llf_flux -n_out 2 -end_time 0.4 -implicit 
-pc_type asm -sub_pc_type ilu -sub_pc_factor_reuse_ordering 
-sub_pc_factor_reuse_fill -gl -ksp_type fgmres -sub_pc_factor_levels 0 
-snes_monitor -snes_converged_reason -ksp_converged_reason -ts_view 
-ksp_pc_side right -sub_pc_factor_nonzeros_along_diagonal -dt 1.0e-2 
-ts_type arkimex -ksp_gmres_restart 50 -snes_max_fail 100 
-snes_max_linear_solve_fail 100 -ksp_max_it 100 -mat_fd_type ds

I get:

Timestep   0: dt = 0.01, T = 0, Res[rho] = 1.44982, Res[rhou] = 6.94003, 
Res[rhov] = 0.524307, Res[E] = 3.70306, CFL = 10.1859
     0 SNES Function norm 3.847597576099e+03
     Linear solve did not converge due to DIVERGED_ITS iterations 100
1 SNES Function norm 2.993575158449e+03
     Linear solve did not converge due to DIVERGED_ITS iterations 100
     2 SNES Function norm 2.992570405848e+03
     Linear solve did not converge due to DIVERGED_ITS iterations 100
     3 SNES Function norm 2.991073138769e+03


But, running with :

mpiexec -n 8 ./hoac cylinder -llf_flux -n_out 2 -end_time 0.4 -implicit 
-pc_type asm -sub_pc_type ilu -sub_pc_factor_reuse_ordering 
-sub_pc_factor_reuse_fill -gl -ksp_type fgmres -sub_pc_factor_levels 0 
-snes_monitor -snes_converged_reason -ksp_converged_reason -ts_view 
-ksp_pc_side right -sub_pc_factor_nonzeros_along_diagonal -dt 1.0e-2 
-ts_type arkimex -ksp_gmres_restart 50 -snes_max_fail 100 
-snes_max_linear_solve_fail 100 -ksp_max_it 100

I get:

Timestep   0: dt = 0.01, T = 0, Res[rho] = 1.44982, Res[rhou] = 6.94003, 
Res[rhov] = 0.524307, Res[E] = 3.70306, CFL = 10.1859
     0 SNES Function norm 3.847597576099e+03
     Linear solve did not converge due to DIVERGED_ITS iterations 100
     1 SNES Function norm 3.633205436192e+03
     Linear solve did not converge due to DIVERGED_ITS iterations 100
     2 SNES Function norm 3.623266783173e+03
     Linear solve did not converge due to DIVERGED_ITS iterations 100
     3 SNES Function norm 3.621467573805e+03


However as you may see the convergence is very very slow? Any suggestions?

Kostas





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111111/ffc6d533/attachment.htm>


More information about the petsc-users mailing list