Coupling MMS with adaptive mesh refinement

Hello FEniCSxers,
I have recently came to realizing how useful and strong the manufactured solutions method is (it is described in the FEniCSx tutorial). I haven’t found a mathematical proof that ‘‘it works’’ but it sounds logically good to me if the manufactured solution shares many properties with the solution to the original PDE (the one without the source term).

On the other hand, I have read about adaptative mesh refinement, to ensure the PDE is well solved on all the domain. In this method, one needs to compute an error or an estimate of the error of the obtained solution with the true solution of the PDE. Can’t we just take the error as computed with the MMS?

I haven’t found examples where the two are coupled together. Is there any particular reason? Am I missing something?

Of course you can, but that wouldn’t be much useful in any real case, i.e. whenever you don’t know the exact solution beforehand.

I think what you’re looking for is a priori error analysis. Here we analytically determine bounds on the error of a finite element approximation. These bounds are typically of the form \Vert u - u_h \Vert_V \leq \mathcal{O(h^{a p + b})} where V is an appropriate norm, h is a measure of mesh granularity, p is the polynomial degree employed in the finite element basis and a and b are constants. Knowing these estimates we can know exactly what the rates of convergence should be. Using uniform mesh refinement we are able to know that our finite element implementation is correct as it will match the rates of convergence which are analytically determined through analysis.

See for example, the tutorial: Error control: Computing convergence rates — FEniCSx tutorial

Are you implying that a mesh refined using adaptive mesh on a PDE with a source term (not the original PDE we want to solve, but the one arising from the MMS) is not necessarily suited for the original PDE (without the source term)?
This would indeed make sense, and you’re right, I overlooked this. I just want to confirm.

Yes, exactly, this would be an application of the MMS since in this case you know u.
But the thing is to use a special “optimized” mesh that is coarse wherever it can, and dense only where it needs to be, that would satisfy your criteria of convergences with the MMS.

Then I’d refer you to the literature on hp-adaptive refinement. E.g. Computing with hp-ADAPTIVE FINITE ELEMENTS: Volume 1 One and Two Dimensional ... - Leszek Demkowicz - Google Books