CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   help with algebraic multigrid ineffectiveness (https://www.cfd-online.com/Forums/main/171473-help-algebraic-multigrid-ineffectiveness.html)

MichaelL May 9, 2016 12:04

help with algebraic multigrid ineffectiveness
 
Hi everyone!

I'm working on an projection-method based solver. But when I applied AMG(Algebraic Multigrid) to the 4h layer of grid, which has nx/4 * ny/4 cells(the finest mesh is nx*ny), it didn't work. When the error of 4h-grid is prolongated back to 2h-grid, the error for 2h-grid overshoot instead of decreasing as it should. However, it worked perfectly when I only used 2h-grid.

Has anyone come across such problem, that multigrid goes ineffective at certain coarse grid? :confused::confused:Any pointer would be very helpful!! thanks!

arjun May 9, 2016 13:15

Quote:

Originally Posted by MichaelL (Post 599338)
Hi everyone!

I'm working on an projection-method based solver. But when I applied AMG(Algebraic Multigrid) to the 4h layer of grid, which has nx/4 * ny/4 cells(the finest mesh is nx*ny), it didn't work. When the error of 4h-grid is prolongated back to 2h-grid, the error for 2h-grid overshoot instead of decreasing as it should. However, it worked perfectly when I only used 2h-grid.

Has anyone come across such problem, that multigrid goes ineffective at certain coarse grid? :confused::confused:Any pointer would be very helpful!! thanks!

If you are working with algebraic multigrid how do you know which level you are at. Isnt it that algebraic multigrid acts on a matrix and you create coarse and coarse matrices as coarsening happens.

Also when correction is prolongated error could increase, this increase in error is quickly removed by smoother and this is what smoother's role is.

So check if your smoother is working properly.

MichaelL May 11, 2016 10:52

Quote:

Originally Posted by arjun (Post 599348)
If you are working with algebraic multigrid how do you know which level you are at. Isnt it that algebraic multigrid acts on a matrix and you create coarse and coarse matrices as coarsening happens.

Also when correction is prolongated error could increase, this increase in error is quickly removed by smoother and this is what smoother's role is.

So check if your smoother is working properly.

Thanks for replying!

And yes, when I said the level, I was talking about the matrix size. Sorry I wasn't clear.

And my smoother works just fine when it's working on the other level.

I still didn't find any solution. And I just wonder if anyone has the same problem. I do suspect there could be a very sneaky bug, since multigrid method is garanteed theoretically.

arjun May 11, 2016 11:52

Quote:

Originally Posted by MichaelL (Post 599644)
Thanks for replying!

And yes, when I said the level, I was talking about the matrix size. Sorry I wasn't clear.

And my smoother works just fine when it's working on the other level.

I still didn't find any solution. And I just wonder if anyone has the same problem. I do suspect there could be a very sneaky bug, since multigrid method is garanteed theoretically.


Well no, I at least dont have and i have written pretty much all types of
popular multigrids myself.

One thing I have learned over the years (which is quite simple but I still not able to get it right) is that if something works for others it shall work for us too provided we do everything right.

With this in mind you boviously doing something wrong. Now that you claim smoother is working fine, then you have problem with one of these things

1. You coarse level matrix is wrong.
2. Your restriction is wrong
3. Your prolongation is wrong.

last but most of the time overlooked
4. Your coarest level system is not fully solved.

point number 4 is what most of the people take for granted. If you do not have 1 equation at coarsest level then make sure that you use direct solver to get the solution there. Many cases this small thing create AMG inefficiency.

Good luck. Do everything right and it shall work.

MichaelL May 12, 2016 06:25

Quote:

Originally Posted by arjun (Post 599655)
Well no, I at least dont have and i have written pretty much all types of
popular multigrids myself.

One thing I have learned over the years (which is quite simple but I still not able to get it right) is that if something works for others it shall work for us too provided we do everything right.

With this in mind you boviously doing something wrong. Now that you claim smoother is working fine, then you have problem with one of these things

1. You coarse level matrix is wrong.
2. Your restriction is wrong
3. Your prolongation is wrong.

last but most of the time overlooked
4. Your coarest level system is not fully solved.

point number 4 is what most of the people take for granted. If you do not have 1 equation at coarsest level then make sure that you use direct solver to get the solution there. Many cases this small thing create AMG inefficiency.

Good luck. Do everything right and it shall work.

Thanks a lot! Your advice has been very helpful.

I found out my prolongation made the error overshoot and I wasn't taking the relaxation number into account. Then I changed my relaxation number( made it smaller), and the multigrid worked.

I'm not quite sure what relaxation number leads to the fastest convergence rate, though.

arjun May 12, 2016 06:36

Quote:

Originally Posted by MichaelL (Post 599772)
Thanks a lot! Your advice has been very helpful.

I found out my prolongation made the error overshoot and I wasn't taking the relaxation number into account. Then I changed my relaxation number( made it smaller), and the multigrid worked.

I'm not quite sure what relaxation number leads to the fastest convergence rate, though.


It means you still have problem. Check your coarse level matrix construction. Find a way to make sure it is okay. One way to do is take a poisson problem and agglomorate as if coarsen system is coarse grid problem. (in 2d coarse 4 equations into one as if descretization is of 2H mesh if H was of finer level).
In this case coarse level matrix is exactly same as if you descretiye 2H grid problem.

If you do not get this coarse system then you have problem. In case you get this coarse system then more relaxations should only improve your AMG solver.

MichaelL May 13, 2016 23:27

Quote:

Originally Posted by arjun (Post 599777)
It means you still have problem. Check your coarse level matrix construction. Find a way to make sure it is okay. One way to do is take a poisson problem and agglomorate as if coarsen system is coarse grid problem. (in 2d coarse 4 equations into one as if descretization is of 2H mesh if H was of finer level).
In this case coarse level matrix is exactly same as if you descretiye 2H grid problem.

If you do not get this coarse system then you have problem. In case you get this coarse system then more relaxations should only improve your AMG solver.

The restriction works right. By more relaxations should only improve the solver, what does the 'more relaxations' mean? A larger relaxation number?

I've run my codes with a smaller relaxation number, and the AMG was more robust but the convergence seemed slowed down.

arjun May 14, 2016 06:26

Quote:

Originally Posted by MichaelL (Post 600037)
The restriction works right. By more relaxations should only improve the solver, what does the 'more relaxations' mean? A larger relaxation number?

I've run my codes with a smaller relaxation number, and the AMG was more robust but the convergence seemed slowed down.


yes larger relaxation number. Ideally more relaxation would improve convergence.


PS: It is not completely true though. After a certain number your convergence rate would not change because smoother could only remove certain frequencies.


All times are GMT -4. The time now is 20:45.