Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Faster way to invert block-diagonal systems from DG discretization

More
4 years 8 months 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
Code:
a += (grad(u)*grad(v)+lam*v+u*mu)*dx
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
Code:
inva = a.mat.Inverse(fes.FreeDofs())
Attached is the code.

Best,
Guosheng
Attachments:
More
4 years 8 months ago #1763 by Guosheng Fu
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...
More
4 years 8 months ago #1764 by joachim
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
More
4 years 8 months ago #1765 by Guosheng Fu
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...
Time to create page: 0.180 seconds