This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

iteration steps in AMG preconditioner

0 votes

Dear all,

I have some questions about the AMG preconditioner in the Dolfin solve() funtion. Is the implemented scheme V-cycle? If so, how many iteration steps in the pre-smoothing and post-smoothing processes and how many grid levels are there? Can we change the number of iteration as a parameter in the function?

Thank you very much for your help!

asked Nov 30, 2016 by soddyjr FEniCS Novice (150 points)

1 Answer

+1 vote

If you look at the implementation it seems that all it does is to call

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCHYPRESetType.html

then

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCSetFromOptions.html

Implementation (I am assuming you are using PETSc):

https://bitbucket.org/fenics-project/dolfin/src/ee5424f5def5434c68431215c64d8296676cd6cd/dolfin/la/PETScPreconditioner.cpp?at=master&fileviewer=file-view-default

I have not done so myself, but I assume it is possible to dig into PETSc and figure out which options to set (via petsc4py) so that you can control the Hypre AMG preconditioner. You would then set the options before creating the preconditioner. In fact, you can probably get some info about this from the cbc.block implementation of AMG, see

https://bitbucket.org/fenics-apps/cbc.block/src/4d03dfc0cb768ef32d48aa62ed498bfe1398df2c/block/algebraic/petsc/precond.py?at=master&fileviewer=file-view-default#precond.py-107

answered Dec 5, 2016 by Tormod Landet FEniCS User (5,130 points)
...