CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

help with algebraic multigrid ineffectiveness

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 9, 2016, 12:04
Default help with algebraic multigrid ineffectiveness
  #1
New Member
 
Michael Liu
Join Date: May 2016
Posts: 4
Rep Power: 9
MichaelL is on a distinguished road
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? Any pointer would be very helpful!! thanks!
MichaelL is offline   Reply With Quote

Old   May 9, 2016, 13:15
Default
  #2
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,272
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by MichaelL View Post
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? 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.
arjun is offline   Reply With Quote

Old   May 11, 2016, 10:52
Default
  #3
New Member
 
Michael Liu
Join Date: May 2016
Posts: 4
Rep Power: 9
MichaelL is on a distinguished road
Quote:
Originally Posted by arjun View Post
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.
MichaelL is offline   Reply With Quote

Old   May 11, 2016, 11:52
Default
  #4
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,272
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by MichaelL View Post
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.
arjun is offline   Reply With Quote

Old   May 12, 2016, 06:25
Default
  #5
New Member
 
Michael Liu
Join Date: May 2016
Posts: 4
Rep Power: 9
MichaelL is on a distinguished road
Quote:
Originally Posted by arjun View Post
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.
MichaelL is offline   Reply With Quote

Old   May 12, 2016, 06:36
Default
  #6
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,272
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by MichaelL View Post
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.
arjun is offline   Reply With Quote

Old   May 13, 2016, 23:27
Default
  #7
New Member
 
Michael Liu
Join Date: May 2016
Posts: 4
Rep Power: 9
MichaelL is on a distinguished road
Quote:
Originally Posted by arjun View Post
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.
MichaelL is offline   Reply With Quote

Old   May 14, 2016, 06:26
Default
  #8
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,272
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by MichaelL View Post
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.
arjun is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
algebraic multigrid vs geometric multigrid Anna Tian Main CFD Forum 5 June 18, 2013 05:03
Algebraic Multigrid for CFX Transient Analysis vagantes CFX 3 April 30, 2013 09:36
GAMG = geometric algebraic multigrid? schmittp54 OpenFOAM Programming & Development 1 December 11, 2010 07:25
Black Box Algebraic Multigrid Neazen Main CFD Forum 0 June 4, 2007 07:10
Seeking Algebraic Multigrid Code Anna Main CFD Forum 1 May 11, 2006 20:05


All times are GMT -4. The time now is 18:43.