Molecular dynamics, smoothed-particle applied mechanics, and irreversibility