The number of boundary conditions for a second order partial differential equation is four. That does NOT have to be the four edges of a rectangle. For example, if you have a pde on adiskthen the four conditions will typically be:

1) The value of the function on the boundary of the disk.

2) Whether the value of the function as you go to the center of the disk is finite or not (Solutions to pde's involving the Laplacian, on a disk, for example, typically involves the Bessel functions- and some of the Bessel functions are finite at 0, others not).

3) The fact that the function is periodic with period [itex]2\pi[/itex] in the angle.

4) The fact that the derivative of the function, with respect to the angle, is also periodic with period [itex]2\pi[/itex].