An automated, energy-based, finite-difference procedure for the elastic collapse of rectangular plates and panels