The Laplacian on Cartesian products with mixed boundary conditions