# Laplace's equation with periodic Dirichlet boundary conditions

Consider a Laplace's equation with Dirichlet boundary condition:

${\nabla ^2}\Phi = 0$ in a domain $D$ with given Dirichlet Boundary condition: $\Phi=\Phi_o$ at $\partial D$ (smooth, but not analytic boundary)

The problem is, that $\Phi_o$ is a periodic function and it changes depending on the position.

For example, $\Phi_o(x,y) = \tan^{-1}(y/x)$ for elliptic domain, ($\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$) and thus $\Phi\in [0,2\pi)$; in this case, the non-continuous boundary condition arises on $(x=a,y=0)$ that divides two distinct values ($\Phi_o(y>0) = 2\pi$ and $\Phi_o(y<0)=0$).

As a consequence, the numerical discontinuity is observed at some of the boundary and deteriorate the solution greatly. Is there any possible treatment to aid this problem? Any comment would be greatly appreciated.

This is not just a "numerical discontinuity". Are you sure that this is the problem you want to solve? $\Phi$ looks like a phase, which is defined up to $2\pi$. That may be what you refer to as "periodic", although the context makes it unclear as one thinks of space-periodicity of BCs.
If your solution $\Phi$ is up to $2\pi$, I would rather solve e.g. for $u=\cos\Phi$.