"Jump" boundary condition, or a Periodic Boundary Condition with offset

Hi all,

I am interested in solving the Laplace equation with a particular set of boundary conditions.

Normal periodic boundaries impose
u at Border A = u at Border B.

I want to impose
u @ Border A = u @ Border B + 1

I would have to impose a Lagrange multiplier to specify what the function integrates to over all space, but would this be doable?

In this way, it creates a gradient throughout the system while not constraining the solution at the edge to be a constant or a set function like in the Dirichlet boundary conditions.

Has anyone done this before? If so, do you have any tips?

Hey!
I’m not sure if I get you correctly, but a trick that I used was that I defined a new zone; the boundaries you are aiming to apply your jump over are its boundaries. The mesh count on the edges should be equal, and the mesh count on the transverse should be one.
Then I used a Dirichlet on the boundary to export the value of the main domain, then I added the offset and imposed it to the other boundary:


(Please excuse my English)
See the fig below+non-overlapping example in the documentation.