I have a problem which I'm solving for a function h(x,y)
over a two-dimensional domain D
. The weak form includes a boundary integral along a curve G(s)
(with s
running from 0 to 1 bisecting my domain):
\int_G f*v ds
and also an equation relating h(x,y)
to f
on the curve via:
d/ds (Q(h)) = f
and a boundary condition of
Q = Q0
at s = 0
I can substitute the latter into the former and integrate by parts to find
Q(s=1)*v(s=1) - Q0*v(s=0) - \int_G Q(h) dv/ds ds
.
My question is whether it is possible (and if so how) to implement this as part of the variational form in fenics - i.e. evaluating the functions at a point within the variational form.
If it helps, I will be initially defining G
as a straight line along y=y0
constant, so the d/ds
derivatives will just be d/dy
's.
Thanks in advance!