Effects of boundary conditions on confined optical phonons in semiconductor nanostructures.