[petsc-users] KSPMonitorSingularValue

Barry Smith bsmith at mcs.anl.gov
Tue Oct 25 08:00:14 CDT 2011


  You need to run for much more iterations to get any kind of reliable singular values. Use something like at least  -ksp_gmres_restart 100  -ksp_max_it 100 and see what happens to the singular values.

    Barry

On Oct 25, 2011, at 3:45 AM, Klaij, Christiaan wrote:

>>> The setting is Navier-Stokes, colocated FVM, matrix-free Krylov-Picard
>>> with SIMPLE preconditioning. It works for most case but stagnates
>>> for this particular case although SIMPLE as solver does converge nicely.
>>> 
>> 
>>> How are you applying the action of the linear operator? If you use finite
>>> differencing, it could be inaccurate. Is this incompressible or a low-Mach
>>> compressible formulation? Try -ksp_monitor_true_residual, if the true
>>> residual drifts from the unpreconditioned residual computed by FGMRES, the
>>> Krylov space could be losing orthogonality. You can try
>>> -ksp_gmres_modifiedgramschmidt. Are you losing a lot of progress in
>>> restarts?
>> 
>> 
>> It's incompressible Navier-Stokes. No finite differencing, the
>> action is computed directly without approximations. It's right
>> preconditioning, so preconditioned and true residual should be
>> the same. I don't get any progress, the residual is stagnating
>> from the very first iteration way before any restart.
> 
> Now that I have the singular value monitor working this is what I
> get for a converging problem and the stagnating problem. Both
> problems are quite similar (same type of flow, same type of grid
> type, same BCs, just slightly different geometry). Any ideas?
> 
> Converging problem:
> 
>  0 KSP Residual norm 2.365447773598e+00 % max 1 min 1 max/min 1
>  1 KSP Residual norm 1.688717750865e+00 % max 2.43352 min 2.43352 max/min 1
>  2 KSP Residual norm 1.441677051369e+00 % max 3.39561 min 0.658191 max/min 5.15901
>  3 KSP Residual norm 1.309618066659e+00 % max 3.45429 min 0.477676 max/min 7.23145
>  4 KSP Residual norm 1.236059684429e+00 % max 3.68325 min 0.418244 max/min 8.80645
>  5 KSP Residual norm 1.178488235028e+00 % max 4.26371 min 0.37149 max/min 11.4773
> 
> Stagnating problem (classical Gram-Schmidt):
> 
>  0 KSP Residual norm 6.466095059482e-02 % max 1 min 1 max/min 1
>  1 KSP Residual norm 6.466093783326e-02 % max 1.07631 min 1.07631 max/min 1
>  2 KSP Residual norm 6.466093747580e-02 % max 3.0223 min 1.06721 max/min 2.83196
>  3 KSP Residual norm 6.466093697245e-02 % max 6.79697 min 1.0663 max/min 6.37436
>  4 KSP Residual norm 6.466092195305e-02 % max 8.16759 min 1.06345 max/min 7.68027
>  5 KSP Residual norm 6.466090166280e-02 % max 8.80407 min 1.06326 max/min 8.28026
> 
> Stagnating problem (modified Gram-Schmidt):
> 
>  0 KSP Residual norm 6.470362245549e-02 % max 1 min 1 max/min 1
>  1 KSP Residual norm 6.470334363709e-02 % max 1.08156 min 1.08156 max/min 1
>  2 KSP Residual norm 6.470326556761e-02 % max 3.05856 min 1.07224 max/min 2.8525
>  3 KSP Residual norm 6.470326223293e-02 % max 6.85267 min 1.0711 max/min 6.39777
>  4 KSP Residual norm 6.470312640256e-02 % max 8.17917 min 1.06837 max/min 7.65572
>  5 KSP Residual norm 6.470312619015e-02 % max 8.7711 min 1.06807 max/min 8.21213
> 
> 
> dr. ir. Christiaan Klaij
> CFD Researcher
> Research & Development
> E mailto:C.Klaij at marin.nl
> T +31 317 49 33 44
> 
> MARIN
> 2, Haagsteeg, P.O. Box 28, 6700 AA Wageningen, The Netherlands
> T +31 317 49 39 11, F +31 317 49 32 45, I www.marin.nl
> 



More information about the petsc-users mailing list