Finite Element Simulations And Optimizations Of Plasmonic Structures In Layered Media