HelgeGehring / femwell

FEM mode solver for photonic waveguides
https://helgegehring.github.io/femwell/
GNU General Public License v3.0
112 stars 33 forks source link

fix for multilines #66

Closed HelgeGehring closed 1 year ago

HelgeGehring commented 1 year ago

@simbilod could you have a look?

HelgeGehring commented 1 year ago

from collections import OrderedDict

import shapely

from femwell.mesh import mesh_from_OrderedDict

line1 = shapely.LineString(((0, 0), (0, 1))) line2 = shapely.LineString(((6, 0), (6, 1))) line_bottom = shapely.LineString(((0, 0), (15, 0))) line_top = shapely.LineString(((0, 1), (15, 1))) waveguide1 = shapely.box(0, 0, 5, 1) waveguide2 = shapely.box(5, 0, 15, 1) mesh_from_OrderedDict( OrderedDict( line1=line1, line2=line2, line_top=line_top, line_bottom=line_bottom, waveguide2=waveguide2, waveguide1=waveguide1, ), resolutions=dict(), default_resolution_max=0.05, filename="test.msh", ) This was failing before

simbilod commented 1 year ago

yes this is exactly how I deal with this problem elsewhere in the code :)