Static condensation for hybrid discontinuous Galerkin methods

Hello everyone,

I’ve been playing around with FF++ to solve some problems quite successfully. We are using a hybrid discontinuous Galerkin formulation. Currently, we are solving a time-dependent Cahn-Hilliard-like problem.

However, we were not able to implement the static condensation (Schur complement) approach to reduce the size of the global linear system.

I’ve looked around and in the documentation, but I haven’t found many tips about this.
Also I’ve seen papers citing FreeFEM++ and which seem to use this approach.
I wonder if there is an example somewhere so that I could learn how to do it on FF++ efficiently.

Thanks for your attention.
Best regards,

What do you want to do efficiently? Static condensation or solving Cahn–Hilliard equation?

Sorry if the message was confusing.

I would like to perform the static condensation.
The CH code is working, but without static condensation.

You want to do static condensation on each element? Or for the global system?

To day they no sparse static condensation in FreeFem++
in fact you want to eliminate of internal dof of the formulation.

Il is not to hard of code with the HashMatrix, it is the same ShurComplement.cpp algorithm of plugin
but the result is a sparse matrix (ie. a hash matrix in freefem++)

the only difficulty is to compute
I given numbering of Schur complement I[i] is the index in A of the i in S if I[i] >=0
the matrix A is split in 4 blocks [[AII,AIJ],[AJI, AJJ]] where

J = index not in I, AII = A(I,I),

but le matrix AJJ^-1 is a diagonal block matrix
if we get the correct numbering J. (ie. we get a numbering by connect component
of the graphe G_A defined by A (ie i,j a link if a_ij is non zero) restricted on J. ).
then S is Sparse matrix.

If you are able to code this you are well come.
F. Hecht.

Thanks a lot for the reply.
In fact I notice it would be difficult to do it on the element level.
And later on I found this link:

which could be helpful for doing it globally.
I will check it.
Best regards.

There are a lot of PETSc things to help you out. You could also use a fieldsplit preconditioner, and approximate the Schur complement, see this documentation page.