Skip to content

Commit de2d14d

Browse files
committed
fixed a bug that broke HeatChargeSimulationData
1 parent c5ed38e commit de2d14d

File tree

4 files changed

+41
-3
lines changed

4 files changed

+41
-3
lines changed

report.log_BRANCH=develop

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2025-06-09 02:58:24,556 - pyswarms.single.global_best - INFO - Optimize for 2 iters with {'c1': 1.5, 'c2': 1.5, 'w': 0.9}
2+
2025-06-09 02:58:24,559 - pyswarms.single.global_best - INFO - Optimization finished | best cost: -4.0, best pos: [1.31458373 2.68381999 0.17008842]
3+
2025-06-09 02:58:24,567 - pyswarms.single.global_best - INFO - Optimize for 2 iters with {'c1': 1.5, 'c2': 1.5, 'w': 0.9}
4+
2025-06-09 02:58:25,515 - pyswarms.single.global_best - INFO - Optimization finished | best cost: -0.2173841905076921, best pos: [0.21058041 0.59430447 1.60148914]
5+
2025-06-09 02:58:25,520 - pyswarms.single.global_best - INFO - Optimize for 2 iters with {'c1': 1.5, 'c2': 1.5, 'w': 0.9}
6+
2025-06-09 02:58:25,895 - pyswarms.single.global_best - INFO - Optimize for 2 iters with {'c1': 1.5, 'c2': 1.5, 'w': 0.9}
7+
2025-06-09 02:59:48,687 - pyswarms.single.global_best - INFO - Optimize for 2 iters with {'c1': 1.5, 'c2': 1.5, 'w': 0.9}
8+
2025-06-09 02:59:48,691 - pyswarms.single.global_best - INFO - Optimization finished | best cost: -4.0, best pos: [1.31458373 2.68381999 0.17008842]
9+
2025-06-09 02:59:48,698 - pyswarms.single.global_best - INFO - Optimize for 2 iters with {'c1': 1.5, 'c2': 1.5, 'w': 0.9}
10+
2025-06-09 02:59:48,701 - pyswarms.single.global_best - INFO - Optimization finished | best cost: -4.0, best pos: [1.31458373 2.68381999 0.17008842]
11+
2025-06-09 02:59:48,708 - pyswarms.single.global_best - INFO - Optimize for 2 iters with {'c1': 1.5, 'c2': 1.5, 'w': 0.9}
12+
2025-06-09 02:59:48,713 - pyswarms.single.global_best - INFO - Optimize for 2 iters with {'c1': 1.5, 'c2': 1.5, 'w': 0.9}
13+
2025-06-09 02:59:48,716 - pyswarms.single.global_best - INFO - Optimization finished | best cost: -8.0, best pos: [1.31458373 2.68381999 0.17008842]
14+
2025-06-09 02:59:48,723 - pyswarms.single.global_best - INFO - Optimize for 2 iters with {'c1': 1.5, 'c2': 1.5, 'w': 0.9}
15+
2025-06-09 02:59:48,726 - pyswarms.single.global_best - INFO - Optimization finished | best cost: -8.0, best pos: [1.31458373 2.68381999 0.17008842]
16+
2025-06-09 02:59:48,731 - pyswarms.single.global_best - INFO - Optimize for 2 iters with {'c1': 1.5, 'c2': 1.5, 'w': 0.9}
17+
2025-06-09 02:59:48,737 - pyswarms.single.global_best - INFO - Optimize for 2 iters with {'c1': 1.5, 'c2': 1.5, 'w': 0.9}
18+
2025-06-09 02:59:49,887 - pyswarms.single.global_best - INFO - Optimization finished | best cost: -0.2173841905076921, best pos: [0.21058041 0.59430447 1.60148914]
19+
2025-06-09 02:59:49,892 - pyswarms.single.global_best - INFO - Optimize for 2 iters with {'c1': 1.5, 'c2': 1.5, 'w': 0.9}
20+
2025-06-09 02:59:50,882 - pyswarms.single.global_best - INFO - Optimization finished | best cost: -0.2173841905076921, best pos: [0.21058041 0.59430447 1.60148914]
21+
2025-06-09 02:59:50,887 - pyswarms.single.global_best - INFO - Optimize for 2 iters with {'c1': 1.5, 'c2': 1.5, 'w': 0.9}
22+
2025-06-09 02:59:51,757 - pyswarms.single.global_best - INFO - Optimization finished | best cost: -0.2173841905076921, best pos: [0.21058041 0.59430447 1.60148914]
23+
2025-06-09 02:59:51,857 - pyswarms.single.global_best - INFO - Optimize for 2 iters with {'c1': 1.5, 'c2': 1.5, 'w': 0.9}
24+
2025-06-09 02:59:52,763 - pyswarms.single.global_best - INFO - Optimization finished | best cost: -0.2173841905076921, best pos: [0.21058041 0.59430447 1.60148914]
25+
2025-06-09 02:59:52,768 - pyswarms.single.global_best - INFO - Optimize for 2 iters with {'c1': 1.5, 'c2': 1.5, 'w': 0.9}
26+
2025-06-09 02:59:54,346 - pyswarms.single.global_best - INFO - Optimization finished | best cost: -0.2173841905076921, best pos: [0.21058041 0.59430447 1.60148914]
27+
2025-06-09 02:59:54,351 - pyswarms.single.global_best - INFO - Optimize for 2 iters with {'c1': 1.5, 'c2': 1.5, 'w': 0.9}
28+
2025-06-09 02:59:55,614 - pyswarms.single.global_best - INFO - Optimization finished | best cost: -0.6521525715230763, best pos: [0.21058041 0.59430447 1.60148914]
29+
2025-06-09 02:59:55,617 - pyswarms.single.global_best - INFO - Optimize for 2 iters with {'c1': 1.5, 'c2': 1.5, 'w': 0.9}
30+
2025-06-09 02:59:57,191 - pyswarms.single.global_best - INFO - Optimization finished | best cost: -0.8695367620307684, best pos: [0.21058041 0.59430447 1.60148914]
31+
2025-06-09 02:59:57,197 - pyswarms.single.global_best - INFO - Optimize for 2 iters with {'c1': 1.5, 'c2': 1.5, 'w': 0.9}
32+
2025-06-09 02:59:58,257 - pyswarms.single.global_best - INFO - Optimization finished | best cost: -0.4347683810153842, best pos: [0.21058041 0.59430447 1.60148914]
33+
2025-06-09 02:59:58,262 - pyswarms.single.global_best - INFO - Optimize for 2 iters with {'c1': 1.5, 'c2': 1.5, 'w': 0.9}
34+
2025-06-09 02:59:59,275 - pyswarms.single.global_best - INFO - Optimization finished | best cost: -0.4347683810153842, best pos: [0.21058041 0.59430447 1.60148914]
35+
2025-06-09 02:59:59,367 - pyswarms.single.global_best - INFO - Optimize for 2 iters with {'c1': 1.5, 'c2': 1.5, 'w': 0.9}
36+
2025-06-09 03:00:00,172 - pyswarms.single.global_best - INFO - Optimization finished | best cost: -0.2173841905076921, best pos: [0.21058041 0.59430447 1.60148914]

results.prof_BRANCH=develop

290 KB
Binary file not shown.

tidy3d/components/geometry/polyslab.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ class PolySlab(base.Planar):
8989
@staticmethod
9090
def make_shapely_polygon(vertices: ArrayLike) -> shapely.Polygon:
9191
"""Make a shapely polygon from some vertices, first ensures they are untraced."""
92+
vertices = get_static(vertices)
9293
return shapely.Polygon(vertices)
9394

9495
@pydantic.validator("slab_bounds", always=True)

tidy3d/components/tcad/data/sim_data.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
from tidy3d.components.base import Tidy3dBaseModel
1111
from tidy3d.components.base_sim.data.sim_data import AbstractSimulationData
12+
from tidy3d.components.geometry.base import Geometry
1213
from tidy3d.components.data.data_array import (
1314
SpatialDataArray,
1415
SteadyVoltageDataArray,
@@ -262,8 +263,8 @@ def plot_field(
262263

263264
# compute plot bounds
264265
field_data_bounds = field_data.bounds
265-
_, min_bounds = self.pop_axis_and_swap(field_data_bounds[0], axis, swap_axes=swap_axes)
266-
_, max_bounds = self.pop_axis_and_swap(field_data_bounds[1], axis, swap_axes=swap_axes)
266+
_, min_bounds = Geometry.pop_axis_and_swap(field_data_bounds[0], axis, swap_axes=swap_axes)
267+
_, max_bounds = Geometry.pop_axis_and_swap(field_data_bounds[1], axis, swap_axes=swap_axes)
267268

268269
if isinstance(field_data, SpatialDataArray):
269270
# interp out any monitor.size==0 dimensions
@@ -315,7 +316,7 @@ def plot_field(
315316
axis = "xyz".index(planar_coord)
316317
position = float(field_data.coords[planar_coord])
317318

318-
_, xy_coord_labels = self.pop_axis_and_swap(list("xyz"), axis=axis, swap_axes=swap_axes)
319+
_, xy_coord_labels = Geometry.pop_axis_and_swap(list("xyz"), axis=axis, swap_axes=swap_axes)
319320

320321
x_coord_label, y_coord_label = xy_coord_labels[0], xy_coord_labels[1]
321322
field_data.plot(

0 commit comments

Comments
 (0)