Mathematical and Computational Methods in Photonics and Phononics