I would like to impose a Neumann (normal derivative specified) boundary condition such that the normal derivative points away from the boundary on one side but into it on the other.
Consider a square box with a “boundary” (label = CUT) that extends halfway across the box, starting at the left edge. I have solved Laplace’s equation in this box. I have imposed Neumann BCs on the CUT border by using int1d(Th, CUT)(w) in the problem statement.
The figure shows the vector field [dx(phi), dy(phi)]. You can see that the BC is such that the the derivative points out of the cut on both sides. I would like the vectors to point “up” on both sides, so that the vector field flows smoothly up through the cut.