Calculation of normal and leaky modes in planar waveguides based on a semi-analytical spectral element method