Note: Thanks to comments, I realized that I have two problems, each which can be described more clearly on its own. This revised question covers the first.
I would like to solve $$ -\Delta u - 1=0,\quad u(0,y)= 0,\quad u(1,y)=0 $$ over a rectangle using alternating Schwarz. The following is my mesh, where the small disks indicate the internal boundary nodes of the subdomains (the nodes that have Dirichlet conditions that I update on them):
$x = 0$ and $x = 1$ are the physical boundaries of the full mesh. The local solutions do not converge to the global solution. The problem is mostly in the overlapping part of the mesh, here is the difference between the actual solution and the solution given by the local solutions:
If I impose the Dirichlet conditions $u(x,0) = 0$ and $u(x,1/\phi) = 0$, where $1/\phi$ is the height of the mesh, then the local solutions converge to the global solutions.
Should it not also work with only the boundary conditions that I mentioned about earlier?
EDIT: I solved it by selecting the artifical boundary in this manner: