Hi all,
I’m writing my bachelor’s thesis on AFEM at the moment; my focus is on comparing the performance of a residual based error estimation approach and the ZZ estimation approach for a simple Poisson problem. I’m currently trying to implement both into NGSolve, I thought I had a working version testing it on a simple problem with a known solution (poisson problem with u = \sin(\pi x)\sin(\pi y) on an L-shaped domain.
This doesn’t yield super interesting results, so I’m trying to implement it with a solution that should have a singularity. My supervisor suggested I try u = r^{2/3} \sin(\frac{2}{3}\theta)(1-x^2)(1-y^2) (the Cartesian terms are there to meet Dirichlet boundary conditions).
I’m trying to implement this problem into my solver, but I get unexpected behaviour; the total error does not decrease per AFEM iteration, even though the error estimation and mesh refinement steps seem to be running fine. (This weird behaviour of course does suggest an error, I just can’t seem to find it…).
I’ve attached my code (tried to summarise a bit, but not quite sure where my error is…), any tips would be greatly appreciated. My hunch is that it’s got something to do with my integration steps to get the exact error over each element as this could be inaccurate near a singularity?
Solver_Share.ipynb (34.3 KB)