Hi John, I'm CCing the list because I think this is an important, and
potentially dangerous, issue.
On Thu, 11 Feb 2010 17:16:21 0600, John Peterson
wrote:
> Hi Jed,
>
> I was hoping you could elaborate slightly on the point you made here:
>
> http://www.mailarchive.com/libmeshdevel5NWGOfrQmneRv+LV9MX5uipxlwaO[email protected]/msg01372.html
>
> "Since BoomerAMG [1] and ML fail when naively given indefinite
matrices..."
Multigrid in general breaks down for indefinite systems unless you are
very careful about choosing smoothers and coarse spaces that respect the
indefiniteness, and even when you do, they tend not to be nearly as
robust as the analogues for definite systems. The same applies to
multilevel domain decomposition (2level Schwarz, BDDC/FETIDP) which
are closely related to multigrid.
> AMG definitely fails if used for libmesh's example 13 (NavierStokes),
> but by "fails" I mean "gets the wrong answer". It still definitely
> gets an answer though, and the linear solver "converges" beautifully
> on the Newton iterations. Can you explain why it would converge to a
> wrong answer? I was kind of under the (evidently wrong) impression
> that preconditioning controls how quickly you get an answer, but
> doesn't really change the answer you'll actually get.
The problem is that this preconditioner ends up being singular. In
particular, it's null space contains fields that are not
divergencefree. Run with ksp_monitor_true_residual and you'll see
that the true residual stagnates, so it's not converging to anything
useful.
Residuals decrease by a huge amount at first due to the penalty
boundaries, (which most preconditioners can hide), but then don't go any
further. If you strip out the adaptive linear solve tolerances from the
example (this message will be much clearer if you follow along, perhaps
by applying the attached patches), and run
./ex13dbg ksp_monitor_true_residual ksp_converged_reason ksp_rtol
1e15 ksp_gmres_restart 300 pc_type ilu
you'll see that ILU stagnates eventually as well, but this is just due
to numerical instabilities and with ksp_gmres_modifiedgramschmidt, you
can get 12 digits (relative to the initial residual). Also note that
the penalty no longer causes huge residuals after the first solve.
Since the available precision (12 digits) is so close to the current
penalty (1e10), we really ought to decrease the penalty just to
determine that the first solve has worked. For the following, I have
decreased it to 1e5, so although the boundary conditions won't be
wellsatisfied, we can check to high precision whether we're actually
converging in the interior.
./ex13dbg ksp_monitor_true_residual ksp_converged_reason ksp_rtol
1e15 ksp_gmres_modifiedgramschmidt ksp_gmres_restart 300 pc_type ilu
This converges to 1e7, which is good (12 digits) and it keeps getting
better on subsequent solves. On the other hand
./ex13dbg ksp_monitor_true_residual ksp_converged_reason ksp_rtol
1e15 ksp_gmres_modifiedgramschmidt ksp_gmres_restart 300 pc_type hypre
only converges to 3.5e2, pretty much the same as when the penalty was
much bigger. The preconditioned residual keeps falling reliably, but
the unpreconditioned residual stagnates quickly, and doesn't even drop
on subsequent iterations. The preconditioner is essentially singular,
which means that despite converging fantastically in the preconditioned
norm, we're not actually getting divergencefree fields, so precondioned
residuals are meaningless.
If we use right preconditioning, then the norms are all
unpreconditioned. (Note that this means you need to use really tight
tolerances when using penalty boundary conditions!) So here we converge
nicely, and the penaly is pretty much taken care of in the first
iteration.
./ex13dbg ksp_type fgmres ksp_monitor ksp_converged_reason ksp_rtol
1e15 ksp_gmres_modifiedgramschmidt ksp_gmres_restart 300 pc_type ilu
But here we obviously don't converge at all
./ex13dbg ksp_type fgmres ksp_monitor ksp_converged_reason ksp_rtol
1e15 ksp_gmres_modifiedgramschmidt ksp_gmres_restart 300 pc_type hypre
Indeed, we stagnate after only 1 iteration, and the residual is the same
size as after one application of ILU, and only a little smaller than
after one applicaion of Jacobi. So apparently BoomerAMG is *only*
satisfying the penalty boundary conditions, and this solution is
completely worthless.
Jed
