You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(adjoint): Add conductivity gradient for CustomMedium
Introduces support for computing gradients with respect to the `conductivity` field in `CustomMedium`.
To achieve this, the derivative computation logic was generalized:
- The `_derivative_field_cmp` method is refactored to accept a `component` parameter ('real', 'imag', 'complex') to compute the VJP for different parts of the complex permittivity.
- For the 'imag' component, the derivative is scaled by `1 / (omega * epsilon_0)` to convert from derivative w.r.t. complex permittivity to derivative w.r.t. conductivity.
- The `_compute_derivatives` dispatcher now handles the new `"conductivity"` parameter path.
- A new autograd test is added to validate the conductivity gradient calculation on a `CustomMedium` with constant permittivity.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,11 +18,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
18
18
- Added `InternalAbsorber` class for placing first-order absorbing boundary conditions on planes inside the simulation domain. Internal absorbers are automatically wrapped in a PEC frame with a backing PEC plate on the non-absorbing side.
19
19
- Added `absorber` field (default: `True`) to `WavePort` for automatically placing an absorber behind the port.
20
20
- Added `conjugated_dot_product` field in `ModeMonitor` (default: `True`) and `WavePort` (default: `False`) to allow selecting the conjugated or non-conjugated dot product for mode decomposition.
21
+
- Support for gradients with respect to the `conductivity` of a `CustomMedium`.
21
22
22
23
### Changed
23
24
- Validate mode solver object for large number of grid points on the modal plane.
24
25
- Adaptive minimum spacing for `PolySlab` integration is now wavelength relative and a minimum discretization is set for computing gradients for cylinders.
25
26
- The `TerminalComponentModeler` defaults to the pseudo wave definition of scattering parameters. The new field `s_param_def` can be used to switch between either pseudo or power wave definitions.
27
+
- Add support for `np.unwrap` in `tidy3d.plugins.autograd`.
26
28
27
29
### Fixed
28
30
- Fixed missing amplitude factor and handling of negative normal direction case when making adjoint sources from `DiffractionMonitor`.
0 commit comments