jonfanlab / Metagrating-Topology-Optimization

52 stars 26 forks source link

Something wrong about the incident angle #1

Closed HalleyChen closed 3 years ago

HalleyChen commented 4 years ago

If incident angle, OptParm.Input.Theta , in initialize.m is not equal to zero, there will be errors on line 146 or line 162 in OptimizeDevice.m

evanwang13 commented 3 years ago

Error was occurring because the example period calculation did not account for non-zero incidence angles. As a result, the structure did not have the targeted diffraction order. Updated default period calculation in RunOpt.m to better handle changes to incidence angle.