Highlights• Effective equality constraint for fracture irreversibility inequality constraint using slack variable.• The Lagrange Multiplier Method and the Penalty method are adopted to augment the energy functional.• Numerical experiments carried out on both brittle and quasi-brittle fracture problems.