A multilayer waveguide modal solver that handles an arbitrary number of layers.