File tree Expand file tree Collapse file tree 2 files changed +2
-0
lines changed
tidy3d/plugins/adjoint/components Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
14
14
15
15
### Fixed
16
16
- ` ModeSolver.plot_field ` correctly returning the plot axes.
17
+ - Avoid error if non-positive refractive index used for integration resolution in adjoint.
17
18
18
19
## [ 2.7.0rc2] - 2024-05-14
19
20
Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ def _get_medium_params(
101
101
freq_max = float (max (grad_data_eps .eps_xx .f ))
102
102
eps_in = self .medium .eps_model (frequency = freq_max )
103
103
ref_ind = np .sqrt (np .max (np .real (eps_in )))
104
+ ref_ind = max ([1.0 , abs (ref_ind )])
104
105
wvl_free_space = C_0 / freq_max
105
106
wvl_mat = wvl_free_space / ref_ind
106
107
return dict (wvl_mat = wvl_mat , eps_in = eps_in )
You can’t perform that action at this time.
0 commit comments