angler
angler copied to clipboard
fix adjoints for Hz polarization
The adjoint sensitivities are slightly off for Hz polarization. We should fix.
Hello,
Could you solve this problem? I was trying to use Hz polarization but I am facing with two main problems:
- When the mode is excited in a straight waveguide for normalization, I can observe that the field does not seem as it expected to be. Here is the images for 300 nm waveguide and 400 nm waveguide, respectively.


There is a bright point at the location where the mode is excited. I do not observe this on Ez polarization so I guess there is a problem with the field solution (or mode solution) on Hz polarization.
- When I ignore the problem in the mode and try to use Hz polarization for optimization, it does not converge and terminate early by returning a warning from LBFGS as: ABNORMAL_TERMINATION_IN_LNSRCH. When I searched for it, I saw that the problem usually arises from the mismatch between the objective function and the gradient.
So, I guess the slight difference on adjoint sensitivity may arise from the improper mode solution or field solution and thus effect the optimization. Do you have a solution for this problem as I need to use Hz polarization? Moreover, I see that you have a new package 'ceviche', do you still face Hz polarization problem on its FDFD solver because I see that most of your notebook examples are on Ez polarization.
Thank you.
Hi @aonurdasdemir, I will look into the problem when i have more time but for now I'd recommend you use ceviche as the Hz polarization seems reliable at the moment. (Even though examples are in Ez).