Stanford Stratified Structure Solver - Electromagnetic simulator for layered periodic structures