Finite element simulation of the Portevin-LeChatelier effect