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

Assembling forms defined at the boundary

+2 votes

I want to explicitly assemble forms of the type
$$
v\mapsto \int_\Gamma (\partial_n v) \phi d\gamma
$$
where $\Gamma$ is the boundary of the domain $\Omega \in \mathbb R^2$, where the scalar trial function $v$ and the testfunction $\phi$ is defined on. By $\partial_n v$, I denote the normal derivative of $v$.

How can I do this?

asked Jul 15, 2014 by Jan FEniCS User (8,290 points)

1 Answer

+1 vote
 
Best answer

Hi Jan,
Are you trying to implement a Neumann boundary condition? In that case the
Neumann boundary demo can help you

Otherwise if you want to get an integrated Neumann value after you have solved a PDE
you can do

assemble(g*v*ds)

where g is the solution of your PDE and v a test function object.

answered Jul 15, 2014 by Gabriel Balaban FEniCS User (1,210 points)
selected Feb 17, 2017 by Jan

Thank you for the hint. My problem goes beyond applying Neumann BCs, but with some manual work this should be doable using the ds measure.

The link is fixed now.

...