Computation of dynamical phase transitions in solids