This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Evaluate a trial function on a specific facet within a form

0 votes

Hi, I'd like to evaluate a function $u(x,y,z)$ at a certain depth $B$ in a 3D mesh, which just happens to be along the bottom face, in a form like this pseudo-code :

u = TestFunction(V)
v = TrialFunction(V)
a = + inner(grad(u), grad(v)) * dx \
    + u(x,y,B) * v * dx

Here, $B$ could be a $z$-coordinate located precisely where the function $u(x,y,z)$ is facet-marked. This $z$-location is a boundary of the mesh. Hence, the function $u_B(x,y,z) = u(x,y,B)$ does not vary with $z$, only with $x$ and $y$.

This problem would be really easy if the function were prescribed, but since it is an unknown, special care needs to be taken.

The constraints on this non-$z$-varying function is :

$$ \frac{\partial}{\partial z} u_B(x,y,z) = 0, u_B(x,y,z) = u(x,y,B) $$

I feel like this should be possible to do, but perhaps not.

asked Nov 11, 2015 by pf4d FEniCS User (2,970 points)
edited Nov 11, 2015 by pf4d

1 Answer

0 votes

Isn't this just the same as integrating over a surface u*v*ds(i) ?

answered Nov 11, 2015 by chris_richardson FEniCS Expert (31,740 points)
...