A Phenomenological Model for Intergranular Failure by r-type and Wedge-Type Cavitation