Computing Cavity Eigenmodes by means of Adaptive Eigenvalues Displacement