It would be good to have a function for computing the $L^2$ (and possibly more general $L^p$) error norm between finite element functions and/or symbolically defined expressions, for use in verifying correctness on manufactured solutions and studying convergence rates.
It would be good to have a function for computing the $L^2$ (and possibly more general $L^p$) error norm between finite element functions and/or symbolically defined expressions, for use in verifying correctness on manufactured solutions and studying convergence rates.
This should ideally follow the approach in
https://jsdokken.com/dolfinx-tutorial/chapter4/convergence.html#reliable-error-norm-computation
for interpolating the functions to a higher-order finite element space to give more robustness to floating-point errors in the norm computation.