Norming a gradient grad(u)

Hey, if I have e.g. in the following solution of the laplace equation and I want to use its gradient as a coefficient function, how to I scale it, I get dimension problems (I thnink I understand why but it doesnt help me to solve it :wink: )

import netgen.gui
from ngsolve import *
from netgen.geom2d import unit_square

mesh = Mesh(unit_square.GenerateMesh(maxh=0.2))

fes = H1(mesh, order=2, dirichlet="bottom|right")
u = fes.TrialFunction()  # symbolic object
v = fes.TestFunction()   # symbolic object
gfu = GridFunction(fes)  # solution

a = BilinearForm(fes, symmetric=True)
a += grad(u)*grad(v)*dx

f = LinearForm(fes)
f += x*v*dx
f.Assemble() = \
    a.mat.Inverse(freedofs=fes.FreeDofs()) * f.vec

b=-grad(gfu) #works obviously
#b=b/Norm(b) this line doesnt work
b=CoefficientFunction(b) #is that needed? I assume no

I uncommentet the not working line

this was a bug, and the fix will be in the nightly release.

now you can replace it by

b = 1/Norm(b) * b

thx for the report,