Fully vectorial eigenmode calculation of dielectric waveguides using a Rayleigh--Ritz method with rational basis functions