- Thank you received: 6
Faster way to invert block-diagonal systems from DG discretization
- Guosheng Fu
-
Topic Author
- Offline
- Elite Member
-
Less
More
6 years 4 weeks ago #1760
by Guosheng Fu
Hello again,
I would like to get a faster inversion of a local block-diagonal system, which I am using for time-stepping.
The bilinear form is
where u, v belong to DG-Pk space, and lam and mu belong to DG-P0 space.
The matrix is symmetric and block diagonal. What is the fastest way to invert this matrix?
The following direct approach is a bit to slow
Attached is the code.
Best,
Guosheng
I would like to get a faster inversion of a local block-diagonal system, which I am using for time-stepping.
The bilinear form is
Code:
a += (grad(u)*grad(v)+lam*v+u*mu)*dx
The matrix is symmetric and block diagonal. What is the fastest way to invert this matrix?
The following direct approach is a bit to slow
Code:
inva = a.mat.Inverse(fes.FreeDofs())
Best,
Guosheng
Attachments:
- Guosheng Fu
-
Topic Author
- Offline
- Elite Member
-
Less
More
- Thank you received: 6
6 years 4 weeks ago #1763
by Guosheng Fu
Replied by Guosheng Fu on topic Faster way to invert block-diagonal systems from DG discretization
Here I found a solution, might be 3-4 times faster than sparse-direct solver:
First create a block Jacobi preconditioner (which is actually the exact solver), and then apply one-step smoothing. This seems to be the fastest way that I can think of...
First create a block Jacobi preconditioner (which is actually the exact solver), and then apply one-step smoothing. This seems to be the fastest way that I can think of...
6 years 4 weeks ago #1764
by joachim
Replied by joachim on topic Faster way to invert block-diagonal systems from DG discretization
Yes, I matrix-vector multiply with the block-Jacobi should be the fastest choice, it uses dense matrix-vector for the small blocks, and is parallel.
But double-check whether the geom_free for your bilinear-form is really doing what you want.
Joachim
But double-check whether the geom_free for your bilinear-form is really doing what you want.
Joachim
- Guosheng Fu
-
Topic Author
- Offline
- Elite Member
-
Less
More
- Thank you received: 6
6 years 4 weeks ago #1765
by Guosheng Fu
Replied by Guosheng Fu on topic Faster way to invert block-diagonal systems from DG discretization
The geom_free flag is very mysterious to me. I may have to post another question on the subject. As for the current matrix problem, I think it is of no use, and should be turned off.
Well, the matrix-free approach looks quite promising for time domain DG simulation as was demonstrated in the i-tutorials ngsolve.org/docu/latest/i-tutorials/unit...alardg/scalardg.html
But, I need to restructure the code quite a bit to do geom_free...
Well, the matrix-free approach looks quite promising for time domain DG simulation as was demonstrated in the i-tutorials ngsolve.org/docu/latest/i-tutorials/unit...alardg/scalardg.html
But, I need to restructure the code quite a bit to do geom_free...
Time to create page: 0.120 seconds