Solving laplace equation with arbitary BC