  We discuss a system of dilute Bose gas confined in a layered structure of
stacked square lattices (slab geometry). A derived phase diagram reveals a
non-monotonic dependence of the ratio of tunneling to on-site repulsion on the
artificial magnetic field applied to the system. The effect is reduced when
more layers are added, which mimics a two- to quasi-three-dimensional geometry
crossover. Furthermore, we establish a correspondence between anisotropic
infinite (quasi three-dimensional) and isotropic finite (slab geometry) systems
that share exactly the same critical values, which can be an important clue for
choosing experimental setups that are less demanding, but still leading to the
identical results. Finally, we show that the properties of the ideal Bose gas
in a three-dimensional optical lattice can be closely mimicked by finite (slab)
systems, when the number of two-dimensional layers is larger than ten for
isotropic interactions or even less, when the layers are weakly coupled.
