I need to bring the pressure residuals down. CG fails completely with initial residuals e′-340, GMRES or bicgstab with block preconditioner work but residuals are too high. So maybe AMG can help.
My case has n = 40800 with nnz = 203000 so it's not a large case.
After hours of trial and error, I keep getting the following error:
terminate called after throwing an instance of 'viennacl::linalg::amg_coarse_problem_too_large_exception'
what(): No further coarsening possible (1050 coarse points). Consider changing the strong connection threshold or increasing the coarsening cutoff.
are your pressure equations singular? If so, it's essential to project out the nullspace, for which ViennaCL currently does not have an interface.
As for AMG: Have you tried adjusting the strong connection threshold? You may also want to use viennacl::linalg::AMG_INTERPOLATION_METHOD_DIRECT for the interpolation, as smoothed aggreggation results in denser problems on the coarse grid.
Best regards,
Karli
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, looking at "expert comments" it's not but it's symmetric & tricky:
The best information I have at hand is:
"... To go back to the pressure equation, keeping in mind what said above (matrix theory elaborating on the mathematical definition on the term "singular"), you cannot say the matrix originating from its discretization is singular, since it is actually admit inverse (you indirectly determine it by solving the linear system itself).
The matrix of the linear system originating from the discretization of the pressure Poisson equation in standard form is tridiagonal or, more generally, block tridiagonal. There are specific algorithms for the solution of this kind of matrix (Thomas algorithm and its block version for example), which are very effective due to their low computational cost (Thomas algorithm costs O(n), while Gauss method costs O(n^3), for example). ..."
Have you tried adjusting the strong connection threshold?
Yes, lower and higher but I have no idea what the applicable range +/- is.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Karli,
I need to bring the pressure residuals down. CG fails completely with initial residuals e′-340, GMRES or bicgstab with block preconditioner work but residuals are too high. So maybe AMG can help.
My case has n = 40800 with nnz = 203000 so it's not a large case.
After hours of trial and error, I keep getting the following error:
Setup is:
Which parameters help to reduce the size of the AMG coarsening setup?
T.
Hi Tario,
are your pressure equations singular? If so, it's essential to project out the nullspace, for which ViennaCL currently does not have an interface.
As for AMG: Have you tried adjusting the strong connection threshold? You may also want to use
viennacl::linalg::AMG_INTERPOLATION_METHOD_DIRECT
for the interpolation, as smoothed aggreggation results in denser problems on the coarse grid.Best regards,
Karli
are your pressure equations singular?
Well, looking at "expert comments" it's not but it's symmetric & tricky:
The best information I have at hand is:
"... To go back to the pressure equation, keeping in mind what said above (matrix theory elaborating on the mathematical definition on the term "singular"), you cannot say the matrix originating from its discretization is singular, since it is actually admit inverse (you indirectly determine it by solving the linear system itself).
The matrix of the linear system originating from the discretization of the pressure Poisson equation in standard form is tridiagonal or, more generally, block tridiagonal. There are specific algorithms for the solution of this kind of matrix (Thomas algorithm and its block version for example), which are very effective due to their low computational cost (Thomas algorithm costs O(n), while Gauss method costs O(n^3), for example). ..."
Have you tried adjusting the strong connection threshold?
Yes, lower and higher but I have no idea what the applicable range +/- is.