Vibrational modes, elastic stiffness, and piezomagnetic strain of a magnetized rod