Finite-element thermal model for buried-heterostructure diode lasers