flexcompute / tidy3d

Fast electromagnetic solver (FDTD) at scale.
https://docs.flexcompute.com/projects/tidy3d/en/latest/
GNU Lesser General Public License v2.1
179 stars 40 forks source link

fix bug in cylinder VJP related to angles #1948

Closed tylerflex closed 3 weeks ago

tylerflex commented 3 weeks ago

was a pretty dumb mistake. miraculously the numerical tests and the cylinder demos worked before I did this fix.. only caught it this morning when trying out something slightly different.. goes to show how tricky this stuff can get.

Also catches an edge case in the PolySlab VJP that would error in some 2D simulations

tylerflex commented 3 weeks ago

@momchil-flex just fyi. we'll need to merge this before 2.7.3. shouldn't affect notebooks since cylinder is only used in unmerged https://github.com/flexcompute/tidy3d-notebooks/pull/166

tylerflex commented 3 weeks ago

Thanks @yaugenst-flex just made both changes

tylerflex commented 3 weeks ago

sorry, I misread the reviewers icon and thought I needed to re-request a review :P