The relevant code-snippets I use is
def normal_grad(f,n):
return f.Diff(x)*n[0] + f.Diff(y)*n[1]
Vh = H1(mesh, order=order, dirichlet=[1,2,3,4],flags={“dgjumps”: True})
v = Vh.TestFunction()
nF = specialcf.normal(2)
vn = normal_grad(v,n)
vno = normal_grad(v.Other(),nF)
vnno = normal_grad(vno,nF)
vnn = normal_grad(vn,nF)
and I get error
NgException Traceback (most recent call last)
in
179 jump_u_2 = normal_grad(un,nF) - normal_grad(uno,nF)
180 vnno = normal_grad(vno,nF)
→ 181 vnn = normal_grad(vn,nF)
182 jump_v_2 = vnn-vnno
183
in normal_grad(f, n)
1 def normal_grad(f,n):
----> 2 return f.Diff(x)*n[0] + f.Diff(y)*n[1]
3
NgException: Deriv not implemented for CF N5ngfem23NormCoefficientFunctionE
Has anyone stumbled upon this error before? I find it weird since I can do the same thing for a TestFunction, and it works. I am trying to implement higher order directional derivatives.
Best regards,
Henrik