Skip to content

Commit bcc376e

Browse files
dbochkov-flexcomputemomchil-flex
authored andcommitted
allow stl in heat solver
1 parent 0683c5c commit bcc376e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/test_components/test_heat.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,9 @@ def test_heat_sim():
301301
structure = structure.updated_copy(geometry=p, name="polyslab")
302302
_ = heat_sim.updated_copy(structures=list(heat_sim.structures) + [structure])
303303

304-
# test unsupported yet geometries
304+
# stl support
305305
structure = structure.updated_copy(geometry=STL_GEO, name="stl")
306-
with pytest.raises(pd.ValidationError):
307-
_ = heat_sim.updated_copy(structures=list(heat_sim.structures) + [structure])
306+
_ = heat_sim.updated_copy(structures=list(heat_sim.structures) + [structure])
308307

309308
# test unsupported yet zero dimension domains
310309
with pytest.raises(pd.ValidationError):

tidy3d/components/heat/simulation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from ..geometry.base import Box, GeometryGroup
2323
from ..geometry.primitives import Sphere, Cylinder
2424
from ..geometry.polyslab import PolySlab
25+
from ..geometry.mesh import TriangleMesh
2526
from ..scene import Scene
2627

2728
from ..bc_placement import StructureBoundary, StructureStructureInterface
@@ -35,7 +36,7 @@
3536

3637
HEAT_BACK_STRUCTURE_STR = "<<<HEAT_BACKGROUND_STRUCTURE>>>"
3738

38-
HeatSingleGeometryType = (Box, Cylinder, Sphere, PolySlab)
39+
HeatSingleGeometryType = (Box, Cylinder, Sphere, PolySlab, TriangleMesh)
3940

4041

4142
class HeatSimulation(AbstractSimulation):

0 commit comments

Comments
 (0)