A continuum model of nanocrystalline metals under shock loading