Modelling shear flows with smoothed particle hydrodynamics and grid‐based methods