Current vector field formulations can lead to NaN gradient when the permittivity is uniform. Here, we adjust how the special case of uniform permittivity is handled, which seems to resolve the issue.
A new test is added to test_grad.py file, which would have failed previously but now passes.
Tests for several examples are adjusted to run at higher resolution (i.e. higher N) so that they (hopefully) become less sensitive to small changes in the code. Results for reasonable N are essentially unchanged, as seen in uLED efficiency plot below. These can be compared to the figure in #70.
Current vector field formulations can lead to NaN gradient when the permittivity is uniform. Here, we adjust how the special case of uniform permittivity is handled, which seems to resolve the issue.
A new test is added to
test_grad.py
file, which would have failed previously but now passes.Tests for several examples are adjusted to run at higher resolution (i.e. higher N) so that they (hopefully) become less sensitive to small changes in the code. Results for reasonable N are essentially unchanged, as seen in uLED efficiency plot below. These can be compared to the figure in #70.