A discrete direct formulation for elastic-plastic analysis