A learning-based multiscale method and its application to inelastic impact problems. (January 2022)