A computational method for quasi-static fracture