calc_SMD_layer.m 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. %{
  2. Copyright © 2020 Alexey A. Shcherbakov. All rights reserved.
  3. This file is part of GratingFMM.
  4. GratingFMM is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 2 of the License, or
  7. (at your option) any later version.
  8. GratingFMM is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GratingFMM. If not, see <https://www.gnu.org/licenses/>.
  14. %}
  15. %% description:
  16. % calculate a diagonal S-matrix of a homogeneous layer for a 1D set of
  17. % wavevector projections
  18. %% input:
  19. % no: number of Fourier harmonics
  20. % kx0: zero harmonic wavevector projection
  21. % kg: wavevector step
  22. % kh: layer thickness multiplied by the vacuum wavenumber
  23. % eps: layer permittivity
  24. %% output:
  25. % SMD: diagonal interface S-matrix of size (no,2,2)
  26. % block SMD(:,1,1) corresponds to refelection from below to below
  27. % block SMD(:,2,2) corresponds to refelection from above to above
  28. % block SMD(:,2,1) corresponds to transmission from below to above
  29. % block SMD(:,1,2) corresponds to transmission from above to below
  30. % central harmonic index is ind_0 = ceil(no/2)
  31. %% implementation:
  32. function [SMD] = calc_SMD_layer(no, kx0, kg, kh, eps)
  33. kz = fmm_kxz(no, kx0, 0, kg, eps, eps);
  34. SMD = zeros(no,2,2);
  35. SMD(:,1,2) = exp((1i*kh)*kz);
  36. SMD(:,2,1) = SMD(:,1,2);
  37. end
  38. %
  39. % end of calc_SMD_layer
  40. %