gplugins 1.4.2__tar.gz → 2.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. {gplugins-1.4.2 → gplugins-2.0.1}/PKG-INFO +24 -28
  2. {gplugins-1.4.2 → gplugins-2.0.1}/README.md +13 -11
  3. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/__init__.py +1 -1
  4. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/common/base_models/component.py +25 -0
  5. gplugins-2.0.1/gplugins/common/utils/geometry.py +31 -0
  6. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/common/utils/get_capacitance.py +1 -1
  7. gplugins-2.0.1/gplugins/common/utils/get_component_with_net_layers.py +178 -0
  8. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/devsim/get_simulation.py +12 -17
  9. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/elmer/get_capacitance.py +20 -6
  10. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/femwell/mode_solver.py +47 -36
  11. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/femwell/solve_thermal.py +7 -47
  12. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/femwell/test_mode_solver.py +10 -11
  13. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/lumerical/write_sparameters_lumerical.py +0 -4
  14. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/meow/meow_eme.py +4 -3
  15. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/meow/test_meow_simulation.py +8 -5
  16. gplugins-2.0.1/gplugins/meshwell/__init__.py +6 -0
  17. gplugins-2.0.1/gplugins/meshwell/get_meshwell_3D.py +130 -0
  18. gplugins-2.0.1/gplugins/meshwell/get_meshwell_cross_section.py +227 -0
  19. gplugins-2.0.1/gplugins/meshwell/tests/test_meshwell.py +69 -0
  20. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/palace/electrostatic.json +2 -1
  21. gplugins-2.0.1/gplugins/palace/get_capacitance.py +421 -0
  22. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/palace/get_scattering.py +31 -10
  23. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/palace/tests/test_palace.py +81 -65
  24. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/sentaurus/mask_sprocess.py +1 -1
  25. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/sentaurus/sde.py +1 -1
  26. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/sentaurus/sprocess.py +2 -2
  27. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/tidy3d/get_simulation_grating_coupler.py +3 -2
  28. gplugins-2.0.1/gplugins/vlsir/tests/resources/pads_correct.cir +61 -0
  29. gplugins-2.0.1/gplugins/vlsir/tests/resources/pads_correct.scs +72 -0
  30. gplugins-2.0.1/gplugins/vlsir/tests/resources/pads_correct.sp +69 -0
  31. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/vlsir/tests/test_vlsir.py +14 -13
  32. {gplugins-1.4.2 → gplugins-2.0.1}/pyproject.toml +10 -24
  33. gplugins-1.4.2/gplugins/common/utils/get_component_with_net_layers.py +0 -116
  34. gplugins-1.4.2/gplugins/gmsh/__init__.py +0 -33
  35. gplugins-1.4.2/gplugins/gmsh/define_polysurfaces.py +0 -51
  36. gplugins-1.4.2/gplugins/gmsh/get_mesh.py +0 -154
  37. gplugins-1.4.2/gplugins/gmsh/parse_component.py +0 -191
  38. gplugins-1.4.2/gplugins/gmsh/parse_gds.py +0 -149
  39. gplugins-1.4.2/gplugins/gmsh/tests/test_custom_names.py +0 -112
  40. gplugins-1.4.2/gplugins/gmsh/tests/test_meshing_2D.py +0 -76
  41. gplugins-1.4.2/gplugins/gmsh/tests/test_meshing_3D.py +0 -55
  42. gplugins-1.4.2/gplugins/gmsh/uz_xsection_mesh.py +0 -494
  43. gplugins-1.4.2/gplugins/gmsh/xy_xsection_mesh.py +0 -261
  44. gplugins-1.4.2/gplugins/gmsh/xyz_mesh.py +0 -389
  45. gplugins-1.4.2/gplugins/palace/get_capacitance.py +0 -639
  46. gplugins-1.4.2/gplugins/vlsir/tests/resources/pads_correct.cir +0 -61
  47. gplugins-1.4.2/gplugins/vlsir/tests/resources/pads_correct.scs +0 -72
  48. gplugins-1.4.2/gplugins/vlsir/tests/resources/pads_correct.sp +0 -69
  49. {gplugins-1.4.2 → gplugins-2.0.1}/LICENSE +0 -0
  50. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/common/__init__.py +0 -0
  51. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/common/base_models/__init__.py +0 -0
  52. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/common/base_models/simulation.py +0 -0
  53. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/common/config.py +0 -0
  54. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/common/types.py +0 -0
  55. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/common/utils/__init__.py +0 -0
  56. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/common/utils/add_simulation_markers.py +0 -0
  57. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/common/utils/async_helpers.py +0 -0
  58. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/common/utils/cache.py +0 -0
  59. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/common/utils/convert_sparameters.py +0 -0
  60. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/common/utils/disable_print.py +0 -0
  61. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/common/utils/get_effective_indices.py +0 -0
  62. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/common/utils/get_scattering.py +0 -0
  63. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/common/utils/get_sparameters_path.py +0 -0
  64. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/common/utils/optical_constants.py +0 -0
  65. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/common/utils/parse_layer_stack.py +0 -0
  66. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/common/utils/plot.py +0 -0
  67. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/common/utils/plot_csv.py +0 -0
  68. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/common/utils/port_symmetries.py +0 -0
  69. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/common/utils/tests/test_get_component_with_new_port_layers.py +0 -0
  70. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/devsim/__init__.py +0 -0
  71. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/devsim/doping.py +0 -0
  72. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/devsim/get_simulation_xsection.py +0 -0
  73. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/devsim/get_solver.py +0 -0
  74. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/devsim/test_devsim.py +0 -0
  75. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/elmer/__init__.py +0 -0
  76. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/elmer/electrostatic.sif.j2 +0 -0
  77. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/elmer/tests/test_elmer.py +0 -0
  78. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/fdtdz/__init__.py +0 -0
  79. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/fdtdz/get_epsilon_fdtdz.py +0 -0
  80. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/fdtdz/get_ports_fdtdz.py +0 -0
  81. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/fdtdz/get_sparameters_fdtdz.py +0 -0
  82. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/femwell/__init__.py +0 -0
  83. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gfviz/Makefile +0 -0
  84. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gfviz/__init__.py +0 -0
  85. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gfviz/b64.py +0 -0
  86. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gfviz/gfviz.py +0 -0
  87. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gfviz/netlist.py +0 -0
  88. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gfviz/serve.py +0 -0
  89. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gfviz/static/b64.js +0 -0
  90. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gfviz/static/schemedit.js +0 -0
  91. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gfviz/static/schemedit.wasm +0 -0
  92. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gfviz/templates/example.json +0 -0
  93. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gfviz/templates/index.html +0 -0
  94. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/__init__.py +0 -0
  95. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/get_material.py +0 -0
  96. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/get_meep_geometry.py +0 -0
  97. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/get_port_eigenmode.py +0 -0
  98. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/get_simulation.py +0 -0
  99. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/get_simulation_grating_farfield.py +0 -0
  100. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/get_simulation_grating_fiber.py +0 -0
  101. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/meep_adjoint_optimization.py +0 -0
  102. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/test_eigenmode.py +0 -0
  103. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/test_materials.py +0 -0
  104. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/test_sparameterNxN/test_sparameterNxN_crossing.csv +0 -0
  105. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/test_sparameterNxN/test_sparameterNxN_straight.csv +0 -0
  106. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/test_write_sparameters_meep/test_sparameterNxN_crossing.csv +0 -0
  107. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/test_write_sparameters_meep/test_sparameterNxN_straight.csv +0 -0
  108. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/test_write_sparameters_meep/test_sparameterNxN_symmetries_straight.csv +0 -0
  109. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/test_write_sparameters_meep/test_sparameter_straight_mpi.csv +0 -0
  110. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/test_write_sparameters_meep/test_sparameter_straight_mpi_pool.csv +0 -0
  111. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_crossing_symmetric.csv +0 -0
  112. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight.csv +0 -0
  113. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_batch.csv +0 -0
  114. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_mpi.csv +0 -0
  115. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_mpi_pool.csv +0 -0
  116. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_symmetric.csv +0 -0
  117. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/test_write_sparameters_meep.py +0 -0
  118. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/write_sparameters_grating.py +0 -0
  119. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/write_sparameters_meep.py +0 -0
  120. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/write_sparameters_meep_batch.py +0 -0
  121. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/gmeep/write_sparameters_meep_mpi.py +0 -0
  122. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/__init__.py +0 -0
  123. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/dataprep/__init__.py +0 -0
  124. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/dataprep/regions.py +0 -0
  125. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/drc/__init__.py +0 -0
  126. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/drc/check_duplicated_cells.py +0 -0
  127. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/drc/check_exclusion.py +0 -0
  128. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/drc/check_inclusion.py +0 -0
  129. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/drc/check_space.py +0 -0
  130. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/drc/check_width.py +0 -0
  131. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/drc/count_drc.py +0 -0
  132. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/drc/samples/drc_errors.py +0 -0
  133. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/drc/write_drc.py +0 -0
  134. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/get_density.py +0 -0
  135. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/get_netlist.py +0 -0
  136. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/netlist_graph.py +0 -0
  137. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/netlist_spice_reader.py +0 -0
  138. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/plot_nets.py +0 -0
  139. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/tests/test_dataprep_regions.py +0 -0
  140. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/tests/test_density.py +0 -0
  141. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/tests/test_drc_exclusion.py +0 -0
  142. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/tests/test_drc_inclusion.py +0 -0
  143. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/tests/test_drc_space.py +0 -0
  144. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/tests/test_drc_width.py +0 -0
  145. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/tests/test_global_density.py +0 -0
  146. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/tests/test_netlist_spice_reader.py +0 -0
  147. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/klayout/tests/test_plot_nets.py +0 -0
  148. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/lumerical/README.md +0 -0
  149. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/lumerical/__init__.py +0 -0
  150. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/lumerical/interconnect.py +0 -0
  151. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/lumerical/mapping_ubcpdk.yml +0 -0
  152. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/lumerical/read.py +0 -0
  153. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/lumerical/settings.py +0 -0
  154. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/lumerical/tests/test_lumerical_read_sparameters.py +0 -0
  155. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/lumerical/tests/test_netlist.py +0 -0
  156. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/lumerical/tests/test_netlist_get_routes.py +0 -0
  157. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/lumerical/write_sparameters_lumerical_components.py +0 -0
  158. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/materials/__init__.py +0 -0
  159. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/materials/inorganic.py +0 -0
  160. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/materials/optical/__init__.py +0 -0
  161. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/materials/optical/optical_mat.py +0 -0
  162. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/materials/optical/refractive_index_info.py +0 -0
  163. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/materials/semiconductor/__init__.py +0 -0
  164. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/materials/semiconductor/semiconductor_mat.py +0 -0
  165. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/meow/__init__.py +0 -0
  166. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/__init__.py +0 -0
  167. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/coupler.py +0 -0
  168. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/find_coupling_vs_gap.py +0 -0
  169. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/find_mode_dispersion.py +0 -0
  170. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/find_modes.py +0 -0
  171. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/find_modes_cross_section.py +0 -0
  172. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/find_neff_ng_dw_dh.py +0 -0
  173. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/find_neff_vs_width.py +0 -0
  174. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/get_mode_solver_coupler.py +0 -0
  175. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/get_mode_solver_cross_section.py +0 -0
  176. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/get_mode_solver_rib.py +0 -0
  177. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/modes/neff_vs_width_nitride.csv +0 -0
  178. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/modes/neff_vs_width_rib.csv +0 -0
  179. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/modes/neff_vs_width_strip.csv +0 -0
  180. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/neff_convergence_test.py +0 -0
  181. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/neff_vs_width.csv +0 -0
  182. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/overlap.py +0 -0
  183. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/tests/test_dw_dh/test_dw_dh.csv +0 -0
  184. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/tests/test_dw_dh/test_dw_dh.obtained.csv +0 -0
  185. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/tests/test_dw_dh/test_dw_dh_dispersion.csv +0 -0
  186. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/tests/test_dw_dh.py +0 -0
  187. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/tests/test_find_modes.py +0 -0
  188. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/tests/test_find_modes_dispersion.py +0 -0
  189. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/tests/test_neff_vs_width/test_neff_vs_width.csv +0 -0
  190. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/tests/test_neff_vs_width/test_neff_vs_width.obtained.csv +0 -0
  191. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/tests/test_neff_vs_width.py +0 -0
  192. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/types.py +0 -0
  193. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/modes/waveguide.py +0 -0
  194. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/palace/__init__.py +0 -0
  195. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/palace/driven.json +0 -0
  196. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/path_length_analysis/__init__.py +0 -0
  197. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/path_length_analysis/path_length_analysis.py +0 -0
  198. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/path_length_analysis/path_length_analysis_from_gds.py +0 -0
  199. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/path_length_analysis/test_pathlength_extraction.py +0 -0
  200. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/path_length_analysis/test_pathlength_extraction_from_gds.py +0 -0
  201. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/path_length_analysis/test_pathlength_extraction_utils.py +0 -0
  202. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/path_length_analysis/utils.py +0 -0
  203. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/photonic_circuit_models/__init__.py +0 -0
  204. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/photonic_circuit_models/coupler.py +0 -0
  205. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/photonic_circuit_models/fsr.py +0 -0
  206. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/photonic_circuit_models/heater.py +0 -0
  207. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/photonic_circuit_models/mzi.py +0 -0
  208. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/photonic_circuit_models/ring.py +0 -0
  209. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/process/__init__.py +0 -0
  210. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/process/diffusion.py +0 -0
  211. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/process/implant_tables.py +0 -0
  212. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/process/pysrim.py +0 -0
  213. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/process/silicon.py +0 -0
  214. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/process/skew/antimony_si_skew.csv +0 -0
  215. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/process/skew/arsenic_si_skew.csv +0 -0
  216. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/process/skew/boron_si_skew.csv +0 -0
  217. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/process/skew/phosphorus_si_skew.csv +0 -0
  218. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/sax/__init__.py +0 -0
  219. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/sax/interpolators.py +0 -0
  220. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/sax/mlp.py +0 -0
  221. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/sax/models.py +0 -0
  222. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/sax/parameter.py +0 -0
  223. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/sax/plot_model.py +0 -0
  224. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/sax/read.py +0 -0
  225. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/sax/strategy.py +0 -0
  226. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/sax/tests/test_mzi.py +0 -0
  227. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/sax/tests/test_mzi_lattice/test_mzi_lattice.obtained.yml +0 -0
  228. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/sax/tests/test_mzi_lattice/test_mzi_lattice.yml +0 -0
  229. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/sax/tests/test_mzi_lattice.py +0 -0
  230. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/sax/tests/test_parameters.py +0 -0
  231. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/sentaurus/mask_sde.py +0 -0
  232. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/sentaurus/sdevice.py +0 -0
  233. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/sentaurus/svisual.py +0 -0
  234. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/spice/__init__.py +0 -0
  235. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/spice/spice_to_yaml.py +0 -0
  236. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/spice/tests/__init__.py +0 -0
  237. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/spice/tests/test_interconnect.py +0 -0
  238. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/tidy3d/__init__.py +0 -0
  239. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/tidy3d/component.py +0 -0
  240. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/tidy3d/get_results.py +0 -0
  241. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/tidy3d/materials.py +0 -0
  242. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/tidy3d/modes.py +0 -0
  243. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/tidy3d/tests/test_component_modeler.py +0 -0
  244. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/tidy3d/tests/test_materials.py +0 -0
  245. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/tidy3d/tests/test_modes/test_sweep_width.csv +0 -0
  246. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/tidy3d/tests/test_modes/test_sweep_width.obtained.csv +0 -0
  247. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/tidy3d/tests/test_modes_coupler.py +0 -0
  248. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/tidy3d/tests/test_modes_waveguide.py +0 -0
  249. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/tidy3d/tests/test_plot_simulation_grating_coupler.py +0 -0
  250. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/tidy3d/tests/test_write_sparameters.py +0 -0
  251. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/tidy3d/tests/tests_sparameters/sim_ref.yaml +0 -0
  252. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/tidy3d/tests/tests_sparameters/test_write_sparameters.py +0 -0
  253. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/tidy3d/tests/tests_sparameters/test_write_sparameters_grating_coupler.py +0 -0
  254. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/tidy3d/types.py +0 -0
  255. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/tidy3d/util.py +0 -0
  256. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/tidy3d/write_sparameters_grating_coupler.py +0 -0
  257. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/typings.py +0 -0
  258. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/vlsir/__init__.py +0 -0
  259. {gplugins-1.4.2 → gplugins-2.0.1}/gplugins/vlsir/export_netlist.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gplugins
3
- Version: 1.4.2
3
+ Version: 2.0.1
4
4
  Summary: gdsfactory plugins
5
5
  Keywords: python
6
6
  Author-email: gdsfactory <contact@gdsfactory.com>
@@ -11,7 +11,7 @@ Classifier: Programming Language :: Python :: 3.12
11
11
  Classifier: Programming Language :: Python :: 3.13
12
12
  Classifier: Operating System :: OS Independent
13
13
  License-File: LICENSE
14
- Requires-Dist: gdsfactory>=9.3.5
14
+ Requires-Dist: gdsfactory>=9.15.1
15
15
  Requires-Dist: pint
16
16
  Requires-Dist: tqdm
17
17
  Requires-Dist: numpy==2.2
@@ -24,45 +24,39 @@ Requires-Dist: pytest ; extra == "dev"
24
24
  Requires-Dist: pytest-cov ; extra == "dev"
25
25
  Requires-Dist: pytest_regressions ; extra == "dev"
26
26
  Requires-Dist: devsim ; extra == "devsim"
27
- Requires-Dist: pyvista<=0.43.8 ; extra == "devsim"
27
+ Requires-Dist: pyvista<=0.46.0 ; extra == "devsim"
28
28
  Requires-Dist: tidy3d>=2.8.2,<2.9 ; extra == "devsim"
29
29
  Requires-Dist: jupytext ; extra == "docs"
30
30
  Requires-Dist: matplotlib ; extra == "docs"
31
31
  Requires-Dist: jupyter-book~=1.0 ; extra == "docs"
32
- Requires-Dist: pyvista[all]<=0.43.8 ; extra == "docs"
32
+ Requires-Dist: pyvista[all]<=0.46.0 ; extra == "docs"
33
33
  Requires-Dist: bokeh ; extra == "docs"
34
34
  Requires-Dist: scikit-learn ; extra == "docs"
35
35
  Requires-Dist: femwell~=0.1.11 ; extra == "femwell"
36
- Requires-Dist: meshwell~=1.0.7 ; extra == "femwell"
36
+ Requires-Dist: meshwell~=2.1.1 ; extra == "femwell"
37
37
  Requires-Dist: jinja2 ; extra == "gfviz"
38
38
  Requires-Dist: fastapi ; extra == "gfviz"
39
39
  Requires-Dist: shapely ; extra == "gfviz"
40
40
  Requires-Dist: natsort ; extra == "gfviz"
41
- Requires-Dist: gmsh==4.14.0 ; extra == "gmsh"
42
- Requires-Dist: h5py ; extra == "gmsh"
43
- Requires-Dist: mapbox_earcut ; extra == "gmsh"
44
- Requires-Dist: meshio ; extra == "gmsh"
45
- Requires-Dist: pygmsh ; extra == "gmsh"
46
- Requires-Dist: pyvista<=0.43.8 ; extra == "gmsh"
47
- Requires-Dist: trimesh ; extra == "gmsh"
48
- Requires-Dist: shapely ; extra == "gmsh"
49
- Requires-Dist: meshwell~=1.0.7 ; extra == "gmsh"
50
41
  Requires-Dist: klayout ; extra == "klayout"
51
42
  Requires-Dist: pyvis<=0.3.1 ; extra == "klayout"
52
43
  Requires-Dist: vlsir ; extra == "klayout"
53
44
  Requires-Dist: vlsirtools ; extra == "klayout"
45
+ Requires-Dist: gitpython ; extra == "klayout"
54
46
  Requires-Dist: luminescent>=0.2.12,<0.4.0 ; extra == "luminescent"
55
47
  Requires-Dist: sortedcontainers ; extra == "luminescent"
56
48
  Requires-Dist: mypy ; extra == "maintainer"
57
49
  Requires-Dist: tbump ; extra == "maintainer"
58
50
  Requires-Dist: towncrier ; extra == "maintainer"
59
51
  Requires-Dist: meow-sim>=0.14.1,<0.15 ; extra == "meow"
60
- Requires-Dist: sax>=0.15.6,<0.16.0 ; extra == "meow"
52
+ Requires-Dist: sax~=0.16.3 ; extra == "meow"
61
53
  Requires-Dist: tidy3d>=2.8.2,<2.9 ; extra == "meow"
54
+ Requires-Dist: shapely ; extra == "meshwell"
55
+ Requires-Dist: meshwell~=2.1.1 ; extra == "meshwell"
62
56
  Requires-Dist: bokeh ; extra == "path-length-analysis"
63
57
  Requires-Dist: numba ; extra == "path-length-analysis"
64
58
  Requires-Dist: shapely ; extra == "path-length-analysis"
65
- Requires-Dist: sax>=0.15.6,<0.16.0 ; extra == "sax"
59
+ Requires-Dist: sax~=0.16.3 ; extra == "sax"
66
60
  Requires-Dist: bokeh ; extra == "schematic"
67
61
  Requires-Dist: ipywidgets ; extra == "schematic"
68
62
  Requires-Dist: natsort ; extra == "schematic"
@@ -75,18 +69,18 @@ Provides-Extra: devsim
75
69
  Provides-Extra: docs
76
70
  Provides-Extra: femwell
77
71
  Provides-Extra: gfviz
78
- Provides-Extra: gmsh
79
72
  Provides-Extra: klayout
80
73
  Provides-Extra: luminescent
81
74
  Provides-Extra: maintainer
82
75
  Provides-Extra: meow
76
+ Provides-Extra: meshwell
83
77
  Provides-Extra: path-length-analysis
84
78
  Provides-Extra: sax
85
79
  Provides-Extra: schematic
86
80
  Provides-Extra: tidy3d
87
81
  Provides-Extra: vlsir
88
82
 
89
- # gplugins 1.4.2
83
+ # gplugins 2.0.1
90
84
 
91
85
  [![docs](https://github.com/gdsfactory/gplugins/actions/workflows/pages.yml/badge.svg)](https://gdsfactory.github.io/gplugins/)
92
86
  [![PyPI](https://img.shields.io/pypi/v/gplugins)](https://pypi.org/project/gplugins/)
@@ -94,7 +88,9 @@ Provides-Extra: vlsir
94
88
  [![MIT](https://img.shields.io/github/license/gdsfactory/gplugins)](https://choosealicense.com/licenses/mit/)
95
89
  [![codecov](https://img.shields.io/codecov/c/github/gdsfactory/gplugins)](https://codecov.io/gh/gdsfactory/gdsfactory/tree/main/gplugins)
96
90
 
97
- GDSFactory plugins:
91
+ ## GDSFactory plugins
92
+
93
+ Run simulations with GDSFactory by installing plugins.
98
94
 
99
95
  - Device simulators
100
96
  - Meshing
@@ -129,7 +125,7 @@ You can install most plugins with:
129
125
  pip install "gdsfactory[full]" --upgrade
130
126
  ```
131
127
 
132
- or
128
+ Or list the plugins individually:
133
129
 
134
130
  ```bash
135
131
  pip install "gplugins[devsim,femwell,gmsh,schematic,meow,meshwell,sax,tidy3d]" --upgrade
@@ -139,7 +135,6 @@ Or install only the plugins you need. For example:
139
135
 
140
136
  ```bash
141
137
  pip install "gplugins[schematic,femwell,meow,sax,tidy3d]" --upgrade
142
-
143
138
  ```
144
139
 
145
140
  ### Non-pip plugins
@@ -152,7 +147,8 @@ The following plugins require special installation as they can't be installed wi
152
147
 
153
148
  ## Installation for contributors
154
149
 
155
- We recommend `uv` for installing GDSFactory:
150
+ We recommend `uv` for installing GDSfactory.
151
+ If you don't already have uv, install with the following command:
156
152
 
157
153
  ```bash
158
154
  # On macOS and Linux.
@@ -164,17 +160,17 @@ curl -LsSf https://astral.sh/uv/install.sh | sh
164
160
  powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
165
161
  ```
166
162
 
167
- Then you can install gdsfactory with:
163
+ -Then you can install GDSFactory with:
168
164
 
169
165
  ```bash
170
- uv venv --python 3.11
166
+ uv venv --python 3.12
171
167
  uv sync --extra docs --extra dev
172
168
  ```
173
169
 
174
-
175
170
  ## Getting started
176
171
 
177
- - [Read docs](https://gdsfactory.github.io/gplugins/)
178
- - [Read gdsfactory docs](https://gdsfactory.github.io/gdsfactory/)
179
- - [![Join the chat at https://gitter.im/gdsfactory-dev/community](https://badges.gitter.im/gdsfactory-dev/community.svg)](https://gitter.im/gdsfactory-dev/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
172
+ - [Read the gplugins docs](https://gdsfactory.github.io/gplugins/)
173
+ - [Read the GDSFactory docs](https://gdsfactory.github.io/gdsfactory/)
174
+ - [Read the GDSFactory+ docs](https://gdsfactory.com/plus/))
175
+ - [Join the discussion at GDSFactory Community Slack](https://join.slack.com/t/gdsfactory-community/shared_invite/zt-3aoygv7cg-r5BH6yvL4YlHfY8~UXp0Wg)
180
176
 
@@ -1,4 +1,4 @@
1
- # gplugins 1.4.2
1
+ # gplugins 2.0.1
2
2
 
3
3
  [![docs](https://github.com/gdsfactory/gplugins/actions/workflows/pages.yml/badge.svg)](https://gdsfactory.github.io/gplugins/)
4
4
  [![PyPI](https://img.shields.io/pypi/v/gplugins)](https://pypi.org/project/gplugins/)
@@ -6,7 +6,9 @@
6
6
  [![MIT](https://img.shields.io/github/license/gdsfactory/gplugins)](https://choosealicense.com/licenses/mit/)
7
7
  [![codecov](https://img.shields.io/codecov/c/github/gdsfactory/gplugins)](https://codecov.io/gh/gdsfactory/gdsfactory/tree/main/gplugins)
8
8
 
9
- GDSFactory plugins:
9
+ ## GDSFactory plugins
10
+
11
+ Run simulations with GDSFactory by installing plugins.
10
12
 
11
13
  - Device simulators
12
14
  - Meshing
@@ -41,7 +43,7 @@ You can install most plugins with:
41
43
  pip install "gdsfactory[full]" --upgrade
42
44
  ```
43
45
 
44
- or
46
+ Or list the plugins individually:
45
47
 
46
48
  ```bash
47
49
  pip install "gplugins[devsim,femwell,gmsh,schematic,meow,meshwell,sax,tidy3d]" --upgrade
@@ -51,7 +53,6 @@ Or install only the plugins you need. For example:
51
53
 
52
54
  ```bash
53
55
  pip install "gplugins[schematic,femwell,meow,sax,tidy3d]" --upgrade
54
-
55
56
  ```
56
57
 
57
58
  ### Non-pip plugins
@@ -64,7 +65,8 @@ The following plugins require special installation as they can't be installed wi
64
65
 
65
66
  ## Installation for contributors
66
67
 
67
- We recommend `uv` for installing GDSFactory:
68
+ We recommend `uv` for installing GDSfactory.
69
+ If you don't already have uv, install with the following command:
68
70
 
69
71
  ```bash
70
72
  # On macOS and Linux.
@@ -76,16 +78,16 @@ curl -LsSf https://astral.sh/uv/install.sh | sh
76
78
  powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
77
79
  ```
78
80
 
79
- Then you can install gdsfactory with:
81
+ -Then you can install GDSFactory with:
80
82
 
81
83
  ```bash
82
- uv venv --python 3.11
84
+ uv venv --python 3.12
83
85
  uv sync --extra docs --extra dev
84
86
  ```
85
87
 
86
-
87
88
  ## Getting started
88
89
 
89
- - [Read docs](https://gdsfactory.github.io/gplugins/)
90
- - [Read gdsfactory docs](https://gdsfactory.github.io/gdsfactory/)
91
- - [![Join the chat at https://gitter.im/gdsfactory-dev/community](https://badges.gitter.im/gdsfactory-dev/community.svg)](https://gitter.im/gdsfactory-dev/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
90
+ - [Read the gplugins docs](https://gdsfactory.github.io/gplugins/)
91
+ - [Read the GDSFactory docs](https://gdsfactory.github.io/gdsfactory/)
92
+ - [Read the GDSFactory+ docs](https://gdsfactory.com/plus/))
93
+ - [Join the discussion at GDSFactory Community Slack](https://join.slack.com/t/gdsfactory-community/shared_invite/zt-3aoygv7cg-r5BH6yvL4YlHfY8~UXp0Wg)
@@ -1,6 +1,6 @@
1
1
  """gplugins - gdsfactory plugins."""
2
2
 
3
- __version__ = "1.4.2"
3
+ __version__ = "2.0.1"
4
4
 
5
5
  import pathlib
6
6
 
@@ -87,6 +87,31 @@ def cleanup_component(component, layer_stack, round_tol=2, simplify_tol=1e-2):
87
87
  }
88
88
 
89
89
 
90
+ def cleanup_component_layermap(component, layermap, round_tol=2, simplify_tol=1e-2):
91
+ """Process component polygons before processing.
92
+
93
+ Uses layermap (design layers) names.
94
+
95
+ Args:
96
+ component: gdsfactory component
97
+ layermap: LayerMap object or dict with layer names as keys
98
+ round_tol: tolerance for rounding coordinates
99
+ simplify_tol: tolerance for polygon simplification
100
+ """
101
+ layer_dict = vars(layermap) if not isinstance(layermap, dict) else layermap
102
+
103
+ return {
104
+ layer: fuse_polygons(
105
+ component,
106
+ layer,
107
+ round_tol=round_tol,
108
+ simplify_tol=simplify_tol,
109
+ )
110
+ for layername, layer in layer_dict.items()
111
+ if not layername.startswith("_") # Skip private attributes
112
+ }
113
+
114
+
90
115
  def move_polar_rad_copy(
91
116
  pos: Coordinate, angle: float, length: float
92
117
  ) -> NDArray[np.float64]:
@@ -0,0 +1,31 @@
1
+ from typing import List
2
+ import gdsfactory as gf
3
+ import kfactory as kf
4
+ from shapely.geometry import Polygon, MultiPolygon
5
+
6
+ def region_to_shapely_polygons(region: kf.kdb.Region) -> MultiPolygon:
7
+ """Convert a kfactory Region to a list of Shapely polygons."""
8
+ polygons = []
9
+ for polygon_kdb in region.each():
10
+ exterior_coords = [
11
+ (gf.kcl.to_um(point.x), gf.kcl.to_um(point.y))
12
+ for point in polygon_kdb.each_point_hull()
13
+ ]
14
+ # Extract hole coordinates
15
+ holes = []
16
+ num_holes = polygon_kdb.holes()
17
+ for hole_idx in range(num_holes):
18
+ hole_coords = []
19
+ for point in polygon_kdb.each_point_hole(hole_idx):
20
+ hole_coords.append((gf.kcl.to_um(point.x), gf.kcl.to_um(point.y)))
21
+ holes.append(hole_coords)
22
+
23
+
24
+ # Create Shapely polygon
25
+ if holes:
26
+ polygon = Polygon(exterior_coords, holes)
27
+ else:
28
+ polygon = Polygon(exterior_coords)
29
+ polygons.append(polygon)
30
+
31
+ return MultiPolygon(polygons)
@@ -60,7 +60,7 @@ def get_capacitance(
60
60
  return run_capacitive_simulation_palace(
61
61
  component,
62
62
  simulation_folder=simulation_folder,
63
- simulator_params=simulator_params,
63
+ solver_config=simulator_params,
64
64
  **kwargs,
65
65
  )
66
66
  case _:
@@ -0,0 +1,178 @@
1
+ import copy
2
+
3
+ import gdsfactory as gf
4
+ from gdsfactory.technology.layer_stack import DerivedLayer, LayerLevel
5
+ from gdsfactory.typings import Port
6
+ import klayout.db as kdb
7
+ from gdsfactory import Component, LayerEnum
8
+ from gdsfactory.technology import LayerStack, LogicalLayer
9
+
10
+
11
+ def get_component_layer_stack(
12
+ component: Component,
13
+ layer_stack: LayerStack,
14
+ ) -> LayerStack:
15
+ """Returns a new layer_stack only with layers that appear in the provided component.
16
+
17
+ Arguments:
18
+ component: to process.
19
+ layer_stack: to process.
20
+
21
+ Returns:
22
+ new_layer_stack: without layers that do not appear in component.
23
+ """
24
+ new_layer_stack = layer_stack.model_copy()
25
+
26
+ layers_present = component.layers
27
+ layernames_dict = new_layer_stack.get_layer_to_layername()
28
+ layernames_present = [
29
+ name
30
+ for sublist in [
31
+ layernames_dict[LogicalLayer(layer=layer)] for layer in layers_present
32
+ ]
33
+ for name in sublist
34
+ ]
35
+ for key in list(new_layer_stack.layers.keys()):
36
+ if key not in layernames_present:
37
+ new_layer_stack.layers.pop(key)
38
+
39
+ return new_layer_stack
40
+
41
+
42
+ def compare_layerlevel_and_port_layers(layer_level: LayerLevel, port: Port) -> bool:
43
+ """Compare the layer information between a :class:`~LayerLevel` and a :class:`~Port`.
44
+
45
+ Note:
46
+ If ``layer_level.layer`` is :class:`~LogicalLayer`, ``layer_level.layer`` is used.
47
+ If ``layer_level.layer`` is :class:`~DerivedLayer`, ``layer_level.derived_layer`` is used.
48
+
49
+ Args:
50
+ layer_level: The LayerLevel object containing layer information
51
+ port: The Port object containing layer_info with layer and datatype
52
+
53
+ Returns:
54
+ bool: True if the layer and datatype match between both objects
55
+ """
56
+
57
+ port_layer_tuple = (
58
+ port.layer_info.layer,
59
+ port.layer_info.datatype,
60
+ )
61
+
62
+ is_derived_layer = isinstance(layer_level.layer, DerivedLayer)
63
+ if is_derived_layer:
64
+ layer_level_tuple = (layer_level.derived_layer.layer.layer, layer_level.derived_layer.layer.datatype)
65
+ return layer_level_tuple == port_layer_tuple
66
+
67
+ layer_enum_or_tuple = layer_level.layer.layer
68
+ if isinstance(layer_enum_or_tuple, tuple):
69
+ layer_level_tuple = layer_enum_or_tuple
70
+ else:
71
+ layer_level_tuple = (
72
+ layer_enum_or_tuple.layer,
73
+ layer_enum_or_tuple.datatype,
74
+ )
75
+
76
+ return layer_level_tuple == port_layer_tuple
77
+
78
+
79
+ def get_component_with_net_layers(
80
+ component: Component,
81
+ layer_stack: LayerStack,
82
+ port_names: list[str],
83
+ delimiter: str = "#",
84
+ new_layers_init: tuple[int, int] = (10010, 0),
85
+ add_to_layerstack: bool = True,
86
+ ) -> Component:
87
+ """Returns a component where polygons touching a port are put on new logical layers.
88
+
89
+ Uses port's layer attribute to decide which polygons need to be renamed.
90
+ New layers are named "layername{delimiter}portname".
91
+
92
+ Args:
93
+ component: to process.
94
+ layer_stack: to process.
95
+ port_names: list of port_names to process into new layers.
96
+ delimiter: the new layer created is called "layername{delimiter}portname".
97
+ new_layers_init: initial layer number for the temporary new layers.
98
+ add_to_layerstack: True by default, but can be set to False to disable parsing of the layerstack.
99
+ """
100
+
101
+ # Initialize returned component
102
+ net_component = component.copy()
103
+
104
+ new_layerlevels = []
105
+ # For each port to consider, convert relevant polygons
106
+ for i, port_name in enumerate(port_names):
107
+ port = component.ports[port_name]
108
+ # Get original port layer polygons, and modify a new component without that layer
109
+ polygons = (
110
+ net_component.extract(layers=(port.layer,))
111
+ .get_polygons()
112
+ .get(port.layer, [])
113
+ )
114
+ net_component = net_component.remove_layers(
115
+ layers=(port.layer,), recursive=False
116
+ )
117
+ for polygon in polygons:
118
+ # If polygon belongs to port, create a unique new layer, and add the polygon to it
119
+ if polygon.sized(int(3 * gf.kcl.dbu)).inside(
120
+ kdb.Point(*port.to_itype().center)
121
+ ):
122
+ try:
123
+ derived_layerlevels_touching_port = [
124
+ e
125
+ for e in layer_stack.layers.values()
126
+ if e.derived_layer is not None
127
+ and e not in new_layerlevels
128
+ and compare_layerlevel_and_port_layers(e, port)
129
+ ]
130
+ logical_layerlevels_touching_port = [
131
+ e
132
+ for e in layer_stack.layers.values()
133
+ if not isinstance(
134
+ e.layer, gf.technology.layer_stack.DerivedLayer
135
+ )
136
+ and e not in new_layerlevels
137
+ and compare_layerlevel_and_port_layers(e, port)
138
+ ]
139
+
140
+ layerlevels_touching_port = (
141
+ derived_layerlevels_touching_port
142
+ + logical_layerlevels_touching_port
143
+ )
144
+ except KeyError as e:
145
+ raise KeyError(
146
+ "Make sure your `layer_stack` contains all layers with ports"
147
+ ) from e
148
+
149
+ for j, old_layerlevel in enumerate(layerlevels_touching_port):
150
+ new_layer_number = (
151
+ new_layers_init[0] + i,
152
+ new_layers_init[1] + j,
153
+ )
154
+ if add_to_layerstack:
155
+ # new_layer = copy.deepcopy(layer_stack.layers[old_layerlevel])
156
+ new_layerlevel = copy.deepcopy(old_layerlevel)
157
+ new_layerlevel.layer = LogicalLayer(
158
+ layer=(
159
+ new_layers_init[0] + i,
160
+ new_layers_init[1] + j,
161
+ )
162
+ )
163
+ new_layerlevel.name = (
164
+ f"{old_layerlevel.name}{delimiter}{port_name}"
165
+ )
166
+ # Increase mesh order to ensure new layer is on top old
167
+ new_layerlevel.mesh_order = old_layerlevel.mesh_order - 1
168
+ layer_stack.layers[
169
+ f"{old_layerlevel.name}{delimiter}{port_name}"
170
+ ] = new_layerlevel
171
+ new_layerlevels.append(new_layerlevel)
172
+ net_component.add_polygon(polygon, layer=new_layer_number)
173
+ # Otherwise put the polygon back on the same layer
174
+ else:
175
+ net_component.add_polygon(polygon, layer=port.layer)
176
+
177
+ net_component.name = f"{component.name}_net_layers"
178
+ return net_component
@@ -20,11 +20,8 @@ from gdsfactory.technology import LayerLevel, LayerStack
20
20
  from scipy.interpolate import NearestNDInterpolator
21
21
 
22
22
  from gplugins.devsim.doping import get_doping_info_generic
23
- from gplugins.gmsh import (
24
- fuse_polygons,
25
- get_u_bounds_polygons,
26
- uz_xsection_mesh,
27
- )
23
+ from gplugins.common.base_models.component import fuse_polygons
24
+ from gplugins.meshwell import get_u_bounds_polygons
28
25
 
29
26
  um_to_cm = 1e-4
30
27
 
@@ -65,18 +62,16 @@ def create_2Duz_simulation(
65
62
  simulation_layertack.layers[contact_name] = layerlevel
66
63
 
67
64
  # Get structural mesh
68
- mesh = uz_xsection_mesh(
69
- component,
70
- xsection_bounds,
71
- simulation_layertack,
72
- resolutions=resolutions,
73
- mesh_scaling_factor=mesh_scaling_factor,
74
- default_resolution_min=default_resolution_min,
75
- default_resolution_max=default_resolution_max,
76
- background_tag=background_tag,
77
- filename=temp_file_name,
78
- global_meshsize_array=global_meshsize_array,
79
- global_meshsize_interpolant_func=global_meshsize_interpolant_func,
65
+ # TODO: Update to use meshwell API
66
+ # The old uz_xsection_mesh has been removed. Replace with:
67
+ # 1. Convert xsection_bounds to LineString
68
+ # 2. Call get_meshwell_cross_section() to get surfaces
69
+ # 3. Use meshwell.cad.cad() to create CAD file
70
+ # 4. Use meshwell.mesh.mesh() to create mesh file with resolutions
71
+ raise NotImplementedError(
72
+ "uz_xsection_mesh has been removed. "
73
+ "This function needs to be updated to use the new meshwell API. "
74
+ "See gplugins/femwell/mode_solver.py:compute_component_slice_modes for an example."
80
75
  )
81
76
 
82
77
  # Get doping layer bounds
@@ -23,7 +23,9 @@ from gplugins.common.utils.async_helpers import (
23
23
  execute_and_stream_output,
24
24
  run_async_with_event_loop,
25
25
  )
26
- from gplugins.gmsh import get_mesh
26
+ from gplugins.meshwell.get_meshwell_3D import get_meshwell_prisms
27
+ from meshwell.cad import cad
28
+ from meshwell.mesh import mesh
27
29
 
28
30
  ELECTROSTATIC_SIF = "electrostatic.sif"
29
31
  ELECTROSTATIC_TEMPLATE = Path(__file__).parent / f"{ELECTROSTATIC_SIF}.j2"
@@ -220,12 +222,24 @@ def run_capacitive_simulation_elmer(
220
222
  if mesh_file:
221
223
  shutil.copyfile(str(mesh_file), str(simulation_folder / filename))
222
224
  else:
223
- get_mesh(
225
+ prisms = get_meshwell_prisms(
224
226
  component=component,
225
- type="3D",
226
- filename=simulation_folder / filename,
227
227
  layer_stack=layer_stack,
228
- **((mesh_parameters or {}) | {"layer_port_delimiter": port_delimiter}),
228
+ )
229
+ cad(
230
+ entities_list=prisms,
231
+ output_file=(
232
+ cad_output := (simulation_folder / filename).with_suffix(".xao")
233
+ ),
234
+ boundary_delimiter=(boundary_delimiter:="boundary"),
235
+ progress_bars=True,
236
+ )
237
+ mesh(
238
+ input_file=cad_output,
239
+ output_file=(simulation_folder / filename).with_suffix(".msh"),
240
+ boundary_delimiter=boundary_delimiter,
241
+ dim=3,
242
+ **(mesh_parameters or {}),
229
243
  )
230
244
 
231
245
  # `interruptible` works on gmsh versions >= 4.11.2
@@ -246,7 +260,7 @@ def run_capacitive_simulation_elmer(
246
260
  # Signals are converted to Elmer Boundary Conditions
247
261
  ground_layers = {
248
262
  next(k for k, v in layer_stack.layers.items() if v.layer == port.layer)
249
- for port in component.get_ports()
263
+ for port in component.ports
250
264
  } # ports allowed only on metal
251
265
  metal_surfaces = [
252
266
  e for e in mesh_surface_entities if any(ground in e for ground in ground_layers)