Hello,
Setting:
1) Unit square domain,
2) Simple scalar Laplacian with no source term.
3) 0 and 1 Dirichlet on opposite ends of the square and zero Neumann on the other two edges.
I am trying to solve the above problem using SIPG by adopting step 74. The expected solution should be perfectly linear with a constant gradient as the problem reduces to a pseudo 1-D problem.
That is the case if I use CG, but with DG I do not get a perfectly linear solution and that is causing me problems.
I have attached below a single image file that includes:
1) The solution.
2) The solution gradient with weird behaviour at the corners
3) Line plot of the solution across the lower wall.
and the code I am using which is based on step 74.
Things I tried/looked into:
- I tried to adapt the code to CG and I get the expected results. I can't straight up impose BCs strongly with DG here.
- I am sure this isn't a Paraview issue because I tried integrating across the boundary within deal and I am getting mesh dependent results.
- The weak form is correct. The Neuman BC shows up as a boundary integral in the rhs which has no contribution. (Neumann zero at these walls).
- I looked into the distributed LDG method within the dealii gallary and adopted it to these BCs and I didn't have this problem.
The only thing I haven't tried yet is to do a simple problem by hand and compare the dealii and my outputs. Before doing that, any ideas on how I can debug this? Is this something associated with imposing BCs weakly with SIPG and will happen no matter what?
best,
Abbas