When one tries to compute the L2-norm of a H(curl)-conforming FemField, it has to be done by converting the symbolic field into a SymPy ImmutableDenseMatrix object, e.g.
domain = Cube(name='domain')
V = VectorFunctionSpace(name='V', domain=domain, kind='hcurl')
v = element_of(V, name='v')
l2_norm_sym = Norm(ImmutableDenseMatrix([v[0], v[1], v[2]]), domain=domain, kind='l2')
domain_h = discretize(domain, ncells=[5,5,5], periodic=[False, False, False])
V_h = discretize(V, domain_h, degree=[3,3,3])
l2_norm_discrete = discretize(l2_norm_sym, domain_h, V_h)
If instead the symbolic vector field is used directly to define the norm, i.e.
l2_norm_sym = Norm(v, domain=domain, kind='l2')
SymPy throws the exception
sympy.matrices.common.NonSquareMatrixError.
It would be more intuitive, if the symbolic vector field could be used directly to define the norm.
When one tries to compute the L2-norm of a H(curl)-conforming FemField, it has to be done by converting the symbolic field into a SymPy
ImmutableDenseMatrixobject, e.g.If instead the symbolic vector field is used directly to define the norm, i.e.
SymPy throws the exception
sympy.matrices.common.NonSquareMatrixError.It would be more intuitive, if the symbolic vector field could be used directly to define the norm.