A constitutive model for inelastic flow and damage evolution in solids under triaxial compression