# Trialfunction does not support BND-forms, maybe a Trace() operator is misssing

Hello everyone ,

I am trying to calculate an integral on the dirichlet boundary, however for some reason I keep getting an error saying “Trialfunction does not support BND-forms, maybe a Trace() operator is misssing”

My geometry is and function space is:

[code] from netgen.geom2d import SplineGeometry
geo = SplineGeometry()
geo.AddRectangle( (0, 0), (0.41, 2), bcs = (“b”, “r”, “t”, “l”))
geo.AddCircle ( (0.2, 1.8), r=0.05, leftdomain=0, rightdomain=1, bc=“cyl”)
mesh = Mesh(geo.GenerateMesh(maxh=0.08))
mesh.Curve(3)

V = VectorH1(mesh,order=3, dirichlet=“t|cyl|l|r”)
Q = H1(mesh,order=2)
X = FESpace([V,Q])
u,p = X.TrialFunction()
v,q = X.TestFunction()

h = specialcf.mesh_size
n = specialcf.normal(2)[/code]

and I want to impose Dirichlet boundary conditions only on the “t” boundary weakly. For that I need to calculate following:

``` a += SymbolicBFI(-nu*InnerProduct(grad(u)*n,v) -nu*InnerProduct(grad(v)*n,u) +nu*alpha/h*InnerProduct(u,v), definedon=mesh.Boundaries("t"))```

but this calculation gives me the above-mentioned error.

Anyone can see what is going on here?

Hi noname,

You want the gradient of volume elements (aligned to boundary elements) evaluated. The SymbolicBFI on the boundary however only has the information of the boundary elements. Use the option “skeleton=True” combined with “VOL_or_BND=BND” to obtain access to the gradients of the aligned volume elements.

Best,
Christoph

For your mentioned purpose, if I write

``````a = BilinearForm(-InnerProduct(Grad(u)*n,v)
*ds("t")).Assemble()
``````

error:
Trialfunction does not support BND-forms, maybe a Trace() operator is misssing.

how to fix?

I think if i use

``````a = BilinearForm(-InnerProduct(Grad(u).Trace()*n,v)
*ds("t")).Assemble()
``````

I get the tangential derivative as said in
https://docu.ngsolve.org/latest/how_to/howto_traceoperator.html?highlight=trace
However, I want get the usual gradient firstly, then integral on the boundary.