Discrete element methods for the plastic analysis of structures subjected to cyclic loading