Adding a Mass Matrix with BDM-Interpolated Discontinuous FE Space to BilinearForm

Dear NGSolve Community,
I am working on implementing a method similar to Section 4.2 of the paper by Alexander Linke and Christian Merdon (Pressure-robustness and discrete Helmholtz projectors in mixed finite element methods for the incompressible Navier–Stokes equations,2016), which introduces a mass matrix for a BDM-interpolated discontinuous finite element (FE) space to the bilinear operator in the Navier-Stokes equations. Specifically, I would like to know if there is a straightforward way in NGSolve to incorporate a mass matrix into a BilinearForm, where the trial and test functions are interpolated or projected into the BDM space. Any guidance or examples on how to achieve this would be greatly appreciated.
Thank you for your help!
shasha

Hi Shasha,

this method by Linke and Merdon is similar to the MITC method for plates, here we have an example:
https://docu.ngsolve.org/latest/i-tutorials/unit-6.1.3-rmplate/Reissner_Mindlin_plate.html#Mixed-Interpolation-of-Tensorial-Components-(MITC)

in the line

a += t*k*G*InnerProduct(Interpolate(grad(u)-beta,Gamma), Interpolate(grad(du)-dbeta,Gamma))*dx

we interpolate (using canonical interpolatation by the degrees of freeom) the term grad(u)-beta into the space Gamma.

That works whenever you have an element-wise defined interpolation operator.
This is satisfied when you interpolate non-conforming P1 into RT0, but not for BDM1.

Joachim

1 Like

Dear Professor. Thank you very much for your reply. I want to know how to implement this DG version of BDM interpolation. I now write the BDM interpolation operator code, but it works for grid functions and coefficient functions, not for trial functions and test functions in bilinear form.Could you provide some insight into this? Thank you for your time!
Shasha

You cannot do the BDM version in the typical element loop, since the interpolant is not local on an element.

Here is another approach: build the mass matrix for BDM, and multiply conversion matrices on both side.

The ConvertOperator returns a sparse matrix T. If you have a coefficentvector x for a function in the source space, then T x is the coefficientvector of the interpolation of the function in the target space.

from ngsolve import *
mesh = Mesh(unit_square.GenerateMesh(maxh=0.2))

fes = VectorValued(FESpace("nonconforming", mesh))
fesbdm = HDiv(mesh, order=1)
ubdm,vbdm = fesbdm.TnT()
fes.ndof, fesbdm.ndof

conv = ConvertOperator(fes, fesbdm)   # conversion from P1-nc to bdm
massbdm = BilinearForm(ubdm*vbdm*dx).Assemble().mat

massp1 = conv.CreateTranspose() @ massbdm @ conv  # multiplies sparse matrices

best, Joachim

Dear Professor,
I am currently using the Relaxed-HDG method to solve the Brinkman problem, and I have successfully assembled the mass matrix following the approach you suggested. Now, I would like to integrate it into the Stokes system. Despite trying various methods, I have been unable to resolve the issue. Could you kindly take a look at it for me?
I apologize for taking up your valuable time.
Best regards,

RHDG-Brinkman.ipynb (5.2 KB)