fixed boundary in 3d solver to work for 2d as well