Modeling shocks and detonations in heterogeneous high explosives