All the examples I have seen regarding Neumann BCs are for the Poisson problem. The thing is that Poisson’s equation has a unique structure regarding the application of the BC. Because you use integration by parts to get the weak form, you have a surface integral that you can use to apply said condition. If the normal derivative is 0, you just remove the surface integral from the form and it applies the condition automatically.
The case I am considering is where you don’t use integration by parts to get the weak form. In particular, consider the transport equation with reflective (i.e. zero Neumann BCs) at both boundaries.
\begin{align} u_t + u_x &= f \text{ on } [x_0, X] \times [t_0, T] \\ \frac{\partial u}{\partial \vec{n}} &= 0 \text{ on } \{x=x_0 \text{ or } x=X\} \times [t_0, T] \end{align}
After discretizing in time one gets a series of stationary problems to solve. How do I implement said boundary conditions in Fenics? I’ve found no examples on how to do so. I’d appreciate any help.