A Numerical Method for Fracture of Rods