We study atoms trapped with a harmonic confinement in an optical lattice characterized by a flat band and Dirac cones. We show that such an optical lattice can be constructed which can be accurately described with the tight-binding or Hubbard models. In the case of fermions the release of the harmonic confinement removes fast atoms occupying the Dirac cones while those occupying the flat band remain immobile. Using exact diagonalization and dynamics we demonstrate that a similar strong occupation of the flat band does not happen in the bosonic case and furthermore that the mean-field model is not capable of describing the dynamics of the boson cloud.