On pressure and velocity boundary conditions for the lattice Boltzmann BGK model