Numerical Simulation Of Elastic, Viscoelastic, And Granular Materials