[petsc-users] Condition Number and GMRES iteration
Matthew Knepley
knepley at gmail.com
Fri Feb 7 07:53:45 CST 2020
On Thu, Feb 6, 2020 at 8:07 PM Alexander Lindsay <alexlindsay239 at gmail.com>
wrote:
> It looks like Fande has attached the eigenvalue plots with the real axis
> having a logarithmic scale. The same plots with a linear scale are attached
> here.
>
> The system has 306 degrees of freedom. 12 eigenvalues are unity for both
> scaled and unscaled cases; this number corresponds to the number of mesh
> nodes with Dirichlet boundary conditions (just a 1 on the diagonal for the
> corresponding rows). The rest of the eigenvalues are orders of magnitude
> smaller for the unscaled case; using scaling these eigenvalues are brought
> much closer 1.
>
> This particular problem is linear but we solve it with SNES, so constant
> Jacobian. We run with options '-pc_type none -ksp_gmres_restart 1000
> -snes_rtol 1e-8 -ksp_rtol 1e-5` so for this linear problem it takes two
> non-linear iterations to solve.
>
Why not just make -ksp_rtol 1e-8?
Thanks,
Matt
> Unscaled:
>
> first nonlinear iteration takes 2 linear iterations
> second nonlinear iteration takes 99 linear iterations
>
> Scaled:
>
> first nonlinear iteration takes 94 linear iterations
> second nonlinear iteration takes 100 linear iterations
>
> Running with `-pc_type svd` the condition number for the unscaled
> simulation is 4e9 while it is 2e3 for the scaled simulation.
>
>
>
> On Thu, Feb 6, 2020 at 4:36 PM Fande Kong <fdkong.jd at gmail.com> wrote:
>
>> Hi All,
>>
>> MOOSE team, Alex and I are working on some variable scaling techniques to
>> improve the condition number of the matrix of linear systems. The goal of
>> variable scaling is to make the diagonal of matrix as close to unity as
>> possible. After scaling (for certain example), the condition number of the
>> linear system is actually reduced, but the GMRES iteration does not
>> decrease at all.
>>
>> From my understanding, the condition number is the worst estimation for
>> GMRES convergence. That is, the GMRES iteration should not increases when
>> the condition number decreases. This actually could example what we saw:
>> the improved condition number does not necessary lead to a decrease in
>> GMRES iteration. We try to understand this a bit more, and we guess that
>> the number of eigenvalue clusters of the matrix of the linear system
>> may/might be related to the convergence rate of GMRES. We plot eigenvalues
>> of scaled system and unscaled system, and the clusters look different from
>> each other, but the GMRRES iterations are the same.
>>
>> Anyone know what is the right relationship between the condition number
>> and GMRES iteration? How does the number of eigenvalue clusters affect
>> GMRES iteration? How to count eigenvalue clusters? For example, how many
>> eigenvalue clusters we have in the attach image respectively?
>>
>> If you need more details, please let us know. Alex and I are happy to
>> provide any details you are interested in.
>>
>>
>> Thanks,
>>
>> Fande Kong,
>>
>>
>>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200207/42ced29c/attachment.html>
More information about the petsc-users
mailing list