diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a2346a25..24760a5f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - `ModeMonitor` and `ModeSolverMonitor` now use the default `td.ModeSpec()` with `num_modes=1` when `mode_spec` is not provided. - Update sidewall angle validator to clarify angle should be specified in radians. +- Reduced the complex tolerance in the mode solver below which permittivity is considered lossless, in order to correctly compute very low-loss modes. ### Fixed - NumPy 2.1 compatibility issue where `numpy.float64` values passed to xarray interpolation would raise TypeError. diff --git a/tidy3d/plugins/mode/solver.py b/tidy3d/plugins/mode/solver.py index 1b2d35c28..70ad0817e 100644 --- a/tidy3d/plugins/mode/solver.py +++ b/tidy3d/plugins/mode/solver.py @@ -15,7 +15,7 @@ from .transforms import angled_transform, radial_transform # Consider vec to be complex if norm(vec.imag)/norm(vec) > TOL_COMPLEX -TOL_COMPLEX = fp_eps +TOL_COMPLEX = 1e-10 # Tolerance for eigs TOL_EIGS = fp_eps # Tolerance for deciding on the matrix to be diagonal or tensorial