Text this: Coupled Elastic–Plastic Damage Modeling of Rock Based on Irreversible Thermodynamics