File tree Expand file tree Collapse file tree 4 files changed +17
-11
lines changed Expand file tree Collapse file tree 4 files changed +17
-11
lines changed Original file line number Diff line number Diff line change 2
2
3
3
from __future__ import annotations
4
4
5
- from typing import Dict , Union
5
+ from typing import Union
6
6
7
7
import pydantic .v1 as pd
8
8
@@ -27,9 +27,9 @@ class VolumeMeshData(HeatChargeMonitorData):
27
27
)
28
28
29
29
@property
30
- def field_components (self ) -> Dict [str , UnstructuredFieldType ]:
30
+ def field_components (self ) -> dict [str , UnstructuredFieldType ]:
31
31
"""Maps the field components to their associated data."""
32
- return dict ( mesh = self .mesh )
32
+ return { " mesh" : self .mesh }
33
33
34
34
def field_name (self , val : str ) -> str :
35
35
"""Gets the name of the fields to be plot."""
@@ -39,5 +39,5 @@ def field_name(self, val: str) -> str:
39
39
def symmetry_expanded_copy (self ) -> VolumeMeshData :
40
40
"""Return copy of self with symmetry applied."""
41
41
42
- new_temp = self ._symmetry_expanded_copy (property = self .temperature )
43
- return self .updated_copy (temperature = new_temp , symmetry = (0 , 0 , 0 ))
42
+ new_mesh = self ._symmetry_expanded_copy (property = self .mesh )
43
+ return self .updated_copy (mesh = new_mesh , symmetry = (0 , 0 , 0 ))
Original file line number Diff line number Diff line change @@ -86,10 +86,6 @@ class DeviceCharacteristics(Tidy3dBaseModel):
86
86
87
87
88
88
class AbstractHeatChargeSimulationData (AbstractSimulationData , ABC ):
89
- pass
90
-
91
-
92
- class HeatChargeSimulationData (AbstractHeatChargeSimulationData ):
93
89
"""Stores results of a :class:`HeatChargeSimulation`.
94
90
95
91
Example
@@ -226,7 +222,7 @@ def plot_field(
226
222
# field.name = field_name
227
223
field_data = self ._field_component_value (field , val )
228
224
229
- if isinstance (monitor_data , TemperatureData ):
225
+ if isinstance (monitor_data , ( TemperatureData , VolumeMeshData ) ):
230
226
property_to_plot = "heat_conductivity"
231
227
elif isinstance (monitor_data , SteadyPotentialData ):
232
228
property_to_plot = "electric_conductivity"
@@ -362,6 +358,10 @@ def plot_field(
362
358
return ax
363
359
364
360
361
+ class HeatChargeSimulationData (AbstractHeatChargeSimulationData ):
362
+ pass
363
+
364
+
365
365
class HeatSimulationData (HeatChargeSimulationData ):
366
366
"""DEPRECATED: Wrapper for Heat Simulation data.
367
367
Original file line number Diff line number Diff line change
1
+ from __future__ import annotations
2
+
1
3
import pydantic as pd
2
4
3
5
from tidy3d .components .base import Tidy3dBaseModel
4
6
from tidy3d .components .tcad .monitors .mesh import VolumeMeshMonitor
5
- from tidy3d .components .tcad .simulation .heat_charge import HeatChargeSimulation
7
+ from tidy3d .components .tcad .simulation .heat_charge import HeatChargeSimulation , TCADAnalysisTypes
6
8
7
9
8
10
class VolumeMesher (Tidy3dBaseModel ):
@@ -17,3 +19,6 @@ class VolumeMesher(Tidy3dBaseModel):
17
19
title = "Monitors" ,
18
20
description = "List of monitors to be used for the mesher." ,
19
21
)
22
+
23
+ def _get_simulation_types (self ) -> list [TCADAnalysisTypes ]:
24
+ return [TCADAnalysisTypes .MESH ]
Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ class TCADAnalysisTypes(str, Enum):
105
105
HEAT = "Heat"
106
106
CONDUCTION = "Conduction"
107
107
CHARGE = "Charge"
108
+ MESH = "Mesh"
108
109
109
110
110
111
class HeatChargeSimulation (AbstractSimulation ):
You can’t perform that action at this time.
0 commit comments