edmundsj / rcwa

Rigorous Coupled Wave Analysis for the calculation of Photonic Crystal R/T spectra
MIT License
93 stars 29 forks source link

Reflected / Transmitted power can be incorrect when reflection region is not free space #5

Closed edmundsj closed 3 years ago

edmundsj commented 3 years ago

This is because, by default, the "Source" takes the argument of freeSpaceLayer and does not force the user to supply a layer. If the layer is not free space and is not supplied, it will still default to the free space layer. It may be better to compute kIncident at runtime by the solver and not when declaring the source.

edmundsj commented 3 years ago

This was fixed with commit a6c732c7dcc6d4a2d04c6568b9d948f98b9a11da.