File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
tidy3d/components/eme/data Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
22
22
- Fixed shaping of ` CustomMedium ` gradients when permittivity data includes a frequency dimension with multiple entries.
23
23
- Bug in contains check for ` LumpedElement ` , which should allow the case of a ` LumpedElement ` touching the simulation boundaries.
24
24
- Bug when generating a grid with snapping points near the simulation boundaries.
25
+ - Fixed field colocation in ` EMEModeSolverMonitor ` .
25
26
- Solver error for EME simulations with bends, introduced when support for 2D EME simulations was added.
26
27
27
28
### Changed
Original file line number Diff line number Diff line change 12
12
from tidy3d .components .data .monitor_data import FieldData , ModeData , ModeSolverData
13
13
from tidy3d .components .data .sim_data import AbstractYeeGridSimulationData
14
14
from tidy3d .components .eme .simulation import EMESimulation
15
+ from tidy3d .components .geometry .base import Box
15
16
from tidy3d .components .types import annotate_type
16
17
from tidy3d .exceptions import SetupError
17
18
@@ -72,9 +73,12 @@ def _extract_mode_solver_data(
72
73
}
73
74
74
75
monitor = self .simulation .mode_solver_monitors [eme_cell_index ]
75
- monitor = monitor . updated_copy (
76
- colocate = data . monitor .colocate ,
76
+ box = Box . from_bounds (
77
+ * Box . bounds_intersection ( monitor .geometry . bounds , data . monitor . geometry . bounds )
77
78
)
79
+ size = box .size
80
+ center = box .center
81
+ monitor = monitor .updated_copy (colocate = data .monitor .colocate , size = size , center = center )
78
82
grid_expanded = self .simulation .discretize_monitor (monitor = monitor )
79
83
return ModeSolverData (** update_dict , monitor = monitor , grid_expanded = grid_expanded )
80
84
You can’t perform that action at this time.
0 commit comments