h1amg

More
2 years 9 months ago #4189 by rhebergens
h1amg was created by rhebergens
I saw here ngsolve.org/docu/nightly/i-tutorials/uni.../preconditioner.html that NGSolve has an algebraic multigrid method implemented. I implemented Poisson equation using H1 space with order 4, I set the preconditioner

c = Preconditioner(a, "h1amg")

and use the CG solver:

inv = CGSolver(a.mat, c.mat, maxsteps=100)

Sometimes the solver converges but the L2-error of the solution isn't great, and sometimes the solver doesn't converge. Here some output of when it doesn't converge:

H1AMG: level = 19, num_edges = 925, nv = 150
H1AMG: level = 20, num_edges = 905, nv = 147
H1AMG: level = 21, num_edges = 888, nv = 145
H1AMG: level = 22, num_edges = 878, nv = 144
0 nan

I have two questions:
1. Is c = Preconditioner(a, "h1amg") the correct way to set the h1amg preconditioner?
2. If I apply static condensation and apply h1amg I get a segmentation fault. Do I need to do something different for the h1amg preconditioner when I also apply static condensation?

When I apply geometric multigrid via c = Preconditioner(a, "multigrid") everything works perfectly (both with and without static condensation). Any insight is greatly appreciated.
More
2 years 9 months ago #4192 by Guosheng Fu
Replied by Guosheng Fu on topic h1amg
I think both h1amg and the geometric multigrid are implemented for the P1 only.

For higher order, you may either do p-version of bddc (with h1amg as a coarse grid solver) or auxilary space preconditioner.

docu.ngsolve.org/latest/i-tutorials/unit....html?highlight=bddc

docu.ngsolve.org/latest/i-tutorials/unit...basis/dualbasis.html
Time to create page: 0.111 seconds