[petsc-users] CG or GMRES
Alan
zhenglun.wei at gmail.com
Fri May 10 08:29:00 CDT 2013
Thanks, Dr. Knepley,
Can I treat AMG and MG like this way. To solve problems with
non-symmetric matrices, MG needs users to provide the coarse mesh
information. This take more complexity on coding than using AMG; but MG,
generally, do better job than MG for non-symmetric problems.
Alan
> On Fri, May 10, 2013 at 8:15 AM, Alan <zhenglun.wei at gmail.com
> <mailto:zhenglun.wei at gmail.com>> wrote:
>
> Thank you so much, Dr. Brown.
> I have a minor question on the 'gamg'. As you said, 'gamg' works for
> many moderately non-symmetric problems. Does this apply for general
> algebraic MG preconditioner or just 'gamg' in PETSc. As you know, does
> 'BoomerAMG' suffer from the non-symmetric matrices problem? Should we
> only use regular MG as the preconditioner for highly non-symmetric
> problems?
>
>
> There is nothing that prevents AMG from working on non-symmetric
> matrices (unlike CG),
> but there are no guarantees that it will do a good job.
>
> Matt
>
> thanks,
> Alan
>
> > "Zhenglun (Alan) Wei" <zhenglun.wei at gmail.com
> <mailto:zhenglun.wei at gmail.com>> writes:
> >
> >> Dear folks,
> >> I hope you're having a nice day.
> >> For the Poisson solver in /src/ksp/ksp/example/tutorial/ex45.c,
> I used
> >> the ksp_type = CG to solve it before; it converges very fast with
> >> pc_type = gamg. However, I was trying to check if the matrix
> generated
> >> by the 'ComputeMatrix' is symmetric by using "ierr =
> MatIsSymmetric(B,
> >> tol, &flg);". It shows that this matrix is not exact a
> symmetric one by
> >> setting tol = 0.0. Yet, the matrix is 'symmetric' if the tol >
> 0.01.
> > The matrix does not enforce boundary conditions symmetrically.
> >
> >> Does this mean that, even if the matrix is not exact symmetric,
> the CG
> >> could still be used.
> > You happen to be iterating in a "benign" space in which the
> operator is SPD.
> >
> >> This brings me a question. Can the CG be used to solve an actual
> >> unsymmetric matrix as long as 'MatIsSymmetric' returns a
> 'PETSC_TRUE'
> >> value with certain tolerance.
> > No.
> >
> >> Is there any rule of thumb for this tolerence? Also, as a
> >> preconditioner, does 'gamg' only work for symmetric
> positive-definite
> >> matrix? or it works for any matrix or even with GMRES?
> > It works for many moderately non-symmetric, certainly for
> something that only
> > has non-symmetric boundary conditions.
>
>
>
>
> --
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130510/6d43dd1c/attachment-0001.html>
More information about the petsc-users
mailing list