Interpolation of Nedelec edge element in FEniCS

Hi, I would like to check the convergence rate of the Nedelec edge element approximating a singular field on an L-shape domain \Omega=(-1,1)\times(-1,1)-[0,1)\times(-1,0]. The exact function {\bf{b}}_e=\nabla \left( r^{4/3} \sin(\frac{4\theta}{3})\right)=[\frac{4}{3} r^{1/3}\sin(\frac{\theta}{3}),\frac{4}{3} r^{1/3}\cos({\frac{\theta}{3}})]^T is defined in polar coordinate, which is curl-free.

However, when I check the Hcurl0 error between this {\bf{b}}_e and its interpolation in FEniCS, the spatial convergence rate is around 0.333. I do not why Hcurl0 error is so large. Below is an example. Thanks.

from dolfin import *
from mshr import *

nx_list = [10,20,40]
domain = Rectangle(Point(-1.0,-1.0), Point(1.0,1.0)) - Rectangle(Point(0.0,-1.0), Point(1,0))
mesh = generate_mesh(domain,nx_list[0])

rr = Expression("sqrt(x[0]x[0]+x[1]x[1])",degree=2)
theta = Expression('x[1] >= 0 ? atan2(x[1], x[0]):atan2(x[1], x[0]) + 2
pi’, degree=2)
b_e = Expression(('4.0/3.0
pow(r,1.0/3.0)sin(t/3.0)','4.0/3.0pow(r,1.0/3.0)*cos(t/3.0)'),
r=rr, t=theta, degree = 5)
Magnetic1 = FiniteElement(“N1curl”, mesh.ufl_cell(), 1)

for nx in nx_list:

Nedelec_l_space = FunctionSpace(mesh, Magnetic1)
b_h = interpolate(b_e,Nedelec_l_space)
print(errornorm(b_e, b_h, 'L2', degree_rise=2),errornorm(b_e, b_h, 'Hcurl0', degree_rise=2))

mesh = refine(mesh)

It might be linked with this issue :

This was merged in fiat but I don’t think that the stable release of FEniCS include it.

Thank you very much for your reply. Indeed, the field {\bf b}_e is smooth,whose first order derivative is singular near the origin. For the above exact {\bf b}_e, the L^2-norm computed by FEniCS is O(h), while H(curl)-norm error is of O(h^{1/3}). It seems that FEniCS computes H(curl)-norm error in a not accurate way. That is, for this {\bf b}_e \in H^{\frac{4}{3}}(curl), both L^2-norm and H(curl)-norm error for the lowest order Nedelec edge element should be of O(h).

I would suggest switching to dolfin-x, Which yesterday replaced FIAT withbasix. This introduced tests such as the one below:

and as far as I am aware a short term goal is to support interpolation of higher order curl-spaces as well.
This is under active development by @mscroggs who probably can provide you with more insights than I can.