Hello everyone,

I am facing problem in giving non-homogeneous Dirichlet boundary conditions while using HDG method for the poisson equation. The convergence rates are not correct for L2 and H1 norm. See the attached code. Poisson-HDG.py (4.3 KB)

If you want to solve something for the facet dofs on the boundary as your system suggests you cannot set them to dirichlet dofs. If I understand your code correctly you are trying to impose dirichlet bnd via nitsche trick. Then your dofs on the boundary should be free. Different approach would be to set the facet dofs to the value and keep them as nonfree dofs.

best

Christopher

it looks like you are mixing up DG and HDG.

I recommend to have a look into 42. Hybrid DG for elliptic equations — Interactive Finite Elements

For HDG, you can set Dirichlet bc. as you do for standard Galerkin methods.

Joachim

Thanks for your suggestion @joachim. I have gone through this but my problem is still not resolved. I am working on writing code for the HDG method introduced in paper https://www.sciencedirect.com/science/article/pii/S0045782519305018#:~:text=The%20method%20yields%20a%20velocity,we%20use%20a%20continuous%20basis. But i am facing difficulties in giving non-zero dirichlet boundary conditions and the resulting convergence rates are incorrect. I have attached the code for Stokes equation. Thank You.

Stokes-HDGG.py (5.9 KB)