Skip to content

Commit 3b1911f

Browse files
committed
fix simulation validator for terminal spec
1 parent cd29f13 commit 3b1911f

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

tidy3d/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
SolidMedium,
1313
SolidSpec,
1414
)
15-
from tidy3d.components.microwave.auto_path_spec import (
16-
AutoPathSpec,
17-
)
1815
from tidy3d.components.microwave.data.monitor_data import (
1916
AntennaMetricsData,
2017
)
@@ -701,7 +698,6 @@ def set_logging_level(level: str) -> None:
701698
"IsothermalSteadyChargeDCAnalysis",
702699
"ChargeToleranceSpec",
703700
"AntennaMetricsData",
704-
"AutoPathSpec",
705701
"AxisAlignedPathSpec",
706702
"CompositePathSpec",
707703
"PathSpec",

tidy3d/components/simulation.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4132,22 +4132,27 @@ def _validate_terminal_specs(self) -> None:
41324132
try:
41334133
v_spec = term_spec.voltage_spec
41344134
i_spec = term_spec.current_spec
4135-
if term_spec.v_spec is None and term_spec.i_spec is None:
4135+
if v_spec is None and i_spec is None:
41364136
i_spec, _ = AutoPathSpec.create_current_path_specs(
4137-
monitor.bounding_box, self.structures, self.grid, monitor.colocate
4137+
monitor.bounding_box,
4138+
self.structures,
4139+
self.grid,
4140+
self.symmetry,
4141+
self.bounding_box,
4142+
monitor.colocate,
41384143
)
41394144
except ValidationError as e:
41404145
raise SetupError(
4141-
f"Failed to setup automatic impedance calculation for monitor '{monitor.name}': {e} "
4142-
)
4146+
f"Failed to setup automatic impedance calculation for monitor '{monitor.name}'."
4147+
) from e
41434148

41444149
try:
41454150
_ = make_voltage_integral(v_spec)
41464151
_ = make_current_integral(i_spec)
41474152
except Exception as e:
41484153
raise SetupError(
4149-
f"Failed to construct path integrals from the terminal specification for monitor '{monitor.name}': {e} "
4150-
)
4154+
f"Failed to construct path integrals from the terminal specification for monitor '{monitor.name}'."
4155+
) from e
41514156

41524157
@cached_property
41534158
def monitors_data_size(self) -> Dict[str, float]:

0 commit comments

Comments
 (0)