Skip to content

Commit 287c08c

Browse files
greptile comments
1 parent fbd9302 commit 287c08c

File tree

6 files changed

+14
-12
lines changed

6 files changed

+14
-12
lines changed

tests/test_components/test_absorbers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def test_port_absorbers_simulations():
117117
],
118118
)
119119

120-
# need to define frequence for ModeABCBoundary
120+
# need to define frequency for ModeABCBoundary
121121
# manually
122122
_ = td.Simulation(
123123
center=[0, 0, 0],
@@ -352,7 +352,7 @@ def test_abc_boundaries_simulations():
352352
run_time=1e-20,
353353
boundary_spec=td.BoundarySpec.all_sides(td.ABCBoundary(permittivity=2)),
354354
)
355-
# not ok if ABC boudary is crossed
355+
# not ok if ABC boundary is crossed
356356
with pytest.raises(pydantic.ValidationError):
357357
_ = td.Simulation(
358358
center=[0, 0, 0],
@@ -416,7 +416,7 @@ def test_abc_boundaries_simulations():
416416
boundary_spec=td.BoundarySpec.all_sides(td.ABCBoundary()),
417417
)
418418

419-
# need to define frequence for ModeABCBoundary
419+
# need to define frequency for ModeABCBoundary
420420
# manually
421421
_ = td.Simulation(
422422
center=[0, 0, 0],

tidy3d/components/boundary.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class ABCBoundary(AbstractABCBoundary):
107107
conductivity: Optional[pd.NonNegativeFloat] = pd.Field(
108108
None,
109109
title="Effective Conductivity",
110-
description="Effective conductivity for determining propagation constant."
110+
description="Effective conductivity for determining propagation constant. "
111111
"If ``None``, this value will be automatically inferred from the medium at "
112112
"the domain boundary and the central frequency of the source.",
113113
)
@@ -197,7 +197,7 @@ def from_source(cls, source: ModeSource) -> ModeABCBoundary:
197197
def from_monitor(
198198
cls,
199199
monitor: Union[ModeMonitor, ModeSolverMonitor],
200-
mode_index: pd.NonNengativeInt = 0,
200+
mode_index: pd.NonNegativeInt = 0,
201201
frequency: Optional[pd.PositiveFloat] = None,
202202
) -> ModeABCBoundary:
203203
"""Instantiate from a ``ModeMonitor`` or ``ModeSolverMonitor``.
@@ -206,7 +206,7 @@ def from_monitor(
206206
----------
207207
monitor : Union[:class:`ModeMonitor`, :class:`ModeSolverMonitor`]
208208
Mode monitor.
209-
mode_index : pd.NonNengativeInt = 0
209+
mode_index : pd.NonNegativeInt = 0
210210
Mode index.
211211
frequency : Optional[pd.PositiveFloat] = None
212212
Frequency for estimating propagation index of absorbed mode.
@@ -1000,7 +1000,7 @@ def mode_abc(
10001000
Cross-sectional plane in which the absorbed mode will be computed.
10011001
mode_spec: ModeSpec = ModeSpec()
10021002
Parameters that determine the modes computed by the mode solver.
1003-
mode_index : pd.NonNengativeInt = 0
1003+
mode_index : pd.NonNegativeInt = 0
10041004
Mode index.
10051005
frequency : Optional[pd.PositiveFloat] = None
10061006
Frequency for estimating propagation index of absorbed mode.
@@ -1050,7 +1050,7 @@ def mode_abc_from_source(cls, source: ModeSource):
10501050
def mode_abc_from_monitor(
10511051
cls,
10521052
monitor: Union[ModeMonitor, ModeSolverMonitor],
1053-
mode_index: pd.NonNengativeInt = 0,
1053+
mode_index: pd.NonNegativeInt = 0,
10541054
frequency: Optional[pd.PositiveFloat] = None,
10551055
):
10561056
"""One-way wave equation mode ABC boundary specification on both sides along a dimension constructed from a mode monitor.

tidy3d/components/eme/simulation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,8 @@ class EMESimulation(AbstractYeeGridSimulation):
212212
internal_absorbers: tuple[()] = pd.Field(
213213
(),
214214
title="Internal Absorbers",
215-
description="Planes with the first order absorbing boundary conditions placed inside the computational domain.",
215+
description="Planes with the first order absorbing boundary conditions placed inside the computational domain. "
216+
"Note: absorbers are not supported in EME simulations.",
216217
)
217218

218219
grid_spec: GridSpec = pd.Field(

tidy3d/components/mode/simulation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ class ModeSimulation(AbstractYeeGridSimulation):
171171
internal_absorbers: tuple[()] = pd.Field(
172172
(),
173173
title="Internal Absorbers",
174-
description="Planes with the first order absorbing boundary conditions placed inside the computational domain.",
174+
description="Planes with the first order absorbing boundary conditions placed inside the computational domain. "
175+
"Note: absorbers are not supported in mode simulations.",
175176
)
176177

177178
grid_spec: GridSpec = pd.Field(

tidy3d/components/simulation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3585,7 +3585,7 @@ def _abc_boundaries_homogeneous(cls, val, values):
35853585

35863586
if isinstance(list(mediums)[0], (AnisotropicMedium, FullyAnisotropicMedium)):
35873587
raise SetupError(
3588-
"An anisotropic medium is detected on an 'ABCBoundary. "
3588+
"An anisotropic medium is detected on an 'ABCBoundary'. "
35893589
"Boundary medium must be homogeneous and isotropic."
35903590
)
35913591

tidy3d/plugins/smatrix/ports/wave.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def to_mode_solver(self, simulation: Simulation, freqs: FreqArray) -> ModeSolver
193193
return mode_solver
194194

195195
def to_absorber(self, snap_center: Optional[float] = None) -> InternalAbsorber:
196-
"""Create a mode source from the wave port."""
196+
"""Create an internal absorber from the wave port."""
197197
center = list(self.center)
198198
if snap_center:
199199
center[self.injection_axis] = snap_center

0 commit comments

Comments
 (0)