I am using interior penalty discontinuous Galerkin to solve a simple Laplace problem: \begin{align*} \nabla u=0 \end{align*} with prescribed 0 and 1 Dirichlet boundary conditions on opposite edges of a unit square. The other edges have 0 Neumann. You'll see above that I have an image of the solution and it's gradient on the right.
The exact solution should be linear and it's gradient should be a constant value which is what I would get with continuous Galerkin. But with DG this isn't the case. I am getting some pollution of my solution and it's gradient at the corner. This won't happen if I defined continuous boundary conditions.
I need to integrate on the edge to queue for forces but the corner elements are causing me problems. I am using an edited version of step 74 of dealii for this and I can't impose BCs strongly in DG.
Any hints or tips on how to circumvent this issue? Other formulations and ways to impose BCs?