Problems computing Eigenvalues in adaptive mesh refinement

Hi everyone

I am trying to solve the generalised Laplace problem with Dirichlet boundary conditions on an annulus and refine the mesh adaptively.
To do so, I used chapter 5.1.9 “Adaptation using residual error indicator” from the documentation as a template.
But since I wanted my mesh to refine in a way that it should first even out the error on all triangles and only after that start to refine all areas, I changed the macro ReMeshIndicator quite a bit (please note that I’m not too expercienced in programming and that therefore my code might not be optimal or very pretty, apologies).
Another change I applied is that I do not want the mesh to coarsen, as I want to observe the convergence rate of the eigenvalues compared to the mesh size.
I’m very happy with how the mesh is refined, so I’d like to keep that as it is.

To my problem:
When I compute the eigenvalues after each mesh adaptation step, they seem to get worse compared to the true eigenvalues. I have computed the true eigenvalues using Mathematica and am fairly sure that they are correct.

One idea was that the eigenvalues might only get better as soon as the whole mesh starts getting refined (i.e. that the error is about the same size on all triangles), so I let the program run for 100 adaptations. Indeed, looking at the mesh it seemed it was refined everywhere but the eigenvalues were still off.

I attach the code and a text file, where you can see the difference of the computed and the true eigenvalue (the list is only for the smallest eigenvalue) for the 100 Adaptations. I did the latter twice, the second time with a larger number of maximal vertices nbvx, after I saw that the maximal number of vertices was too small and the mesh started to coarsen despite me not wanting that.
Note that even though the difference between the true and the calculated eigenvalue settles around 0.387, it does not seem to me that it converges, since it still varies quite a bit.

I’d very much appreciate if you could take a bit of your time and have a look at my problem, as I really don’t know what to do anymore.

Thank you in advance!

Forum.zip (6.0 KB)