Consideration is given to the effects of inhomogeneous shear flow (both regular and chaotic) on nematic liquid crystals in a planar two-dimensional geometry. The Landau-de Gennes equation coupled to an externally-prescribed flow field is the basis for the study: this is solved numerically in a periodic spatial domain. The focus is on a limiting case where the advection is passive, such that variations in the liquid-crystal properties do not feed back into the equation of motion for the fluid velocity. The numerical simulations demonstrate that the coarsening of the liquid-crystal domains is arrested by the flow. The nature of the arrest is different depending on whether the flow is regular or chaotic. For the specific case where tumbling is important, the flow has a strong effect on the the liquid-crystal morphology: this provides a mechanism for controlling the shape of the liquid-crystal domains.