|
16 | 16 | from ..medium import Medium, MediumType3D
|
17 | 17 | from ..scene import Scene
|
18 | 18 | from ..structure import Structure
|
19 |
| -from ..types import TYPE_TAG_STR, Ax, Axis, Bound, LengthUnit, Symmetry |
| 19 | +from ..types import TYPE_TAG_STR, Ax, Axis, Bound, LengthUnit, PriorityMode, Symmetry |
20 | 20 | from ..validators import assert_objects_in_sim_bounds, assert_unique_names
|
21 | 21 | from ..viz import (
|
22 | 22 | PlotParams,
|
@@ -115,6 +115,15 @@ class AbstractSimulation(Box, ABC):
|
115 | 115 | "include the desired unit specifier in labels.",
|
116 | 116 | )
|
117 | 117 |
|
| 118 | + structure_priority_mode: PriorityMode = pd.Field( |
| 119 | + "equal", |
| 120 | + title="Structure Priority Setting", |
| 121 | + description="This field only affects structures of `priority=None`. " |
| 122 | + "If `equal`, the priority of those structures is set to 0; if `conductor`, " |
| 123 | + "the priority of structures made of `LossyMetalMedium` is set to 90, " |
| 124 | + "`PECMedium` to 100, and others to 0.", |
| 125 | + ) |
| 126 | + |
118 | 127 | """ Validating setup """
|
119 | 128 |
|
120 | 129 | @pd.root_validator(pre=True)
|
@@ -184,7 +193,10 @@ def scene(self) -> Scene:
|
184 | 193 | """Scene instance associated with the simulation."""
|
185 | 194 |
|
186 | 195 | return Scene(
|
187 |
| - medium=self.medium, structures=self.structures, plot_length_units=self.plot_length_units |
| 196 | + medium=self.medium, |
| 197 | + structures=self.structures, |
| 198 | + plot_length_units=self.plot_length_units, |
| 199 | + structure_priority_mode=self.structure_priority_mode, |
188 | 200 | )
|
189 | 201 |
|
190 | 202 | def get_monitor_by_name(self, name: str) -> AbstractMonitor:
|
|
0 commit comments