Coarse-grained molecular dynamics simulations of polymer melts in transient and steady shear flow