A particle method for history-dependent materials