klayout-pex-plugin-gmsh
gmsh volume meshes of KLayout-PEX PEX25D scenes, for FEM field solvers:
- the exporter
gmsh - the mesh builder that klayout-pex-plugin-elmer and klayout-pex-plugin-palace share
Usage
pip install klayout-pex-plugin-gmsh
pex25d export cell.pex25d --to gmsh --out_dir mesh
Output:
mesh.msh: gmsh 2.2 ASCII, coordinates in µm, with physical groups- one volume per dielectric, the background included
- one surface per net, floating conductor and ground plane: where it touches a dielectric
outer_boundary: the faces of the domain box
mesh.json: tag, name and permittivity of every groupbody_names.json, when labels need disambiguation: the electrical identity of each solver label
Conductors are not meshed, as electrostatics only needs their surfaces.
Ground openings and electrical identity
GROUND_CUTOUT polygons remove parts of the reference plane. Overlapping openings
are unioned, and polygon holes retain ground islands. Films wrapping the ground
use its retained footprint. Removing the whole reference body is rejected.
The ground profile name identifies its geometry and coatings. Its explicit NET
identifies the electrical reference. Contacts on that net share its terminal group.
A floating conductor remains a separate body even when its name matches a net.
When this requires a different solver label, body_names.json records the mapping.
A filename prefix applies to that file too.
Scenes requiring capacitance accounting are rejected before output. Ground openings and electrical ownership alone do not implement exclusion masks, charge groups or filtered capacitance results.
Options
Pass them with pex25d export --option NAME=VALUE or options={...} in Python. --field_margin sets field_margin_um.
| Option | Default | Meaning |
|---|---|---|
field_margin_um |
8.0 | How far the domain reaches beyond the geometry, sideways and above the stack; ignored when the scene has a domain |
mesh_size_edge_um |
thinnest conductor layer | Element size at conductor edges, where the field concentrates; elements grow away from them |
mesh_size_max_um |
20 × edge size | Largest element |
mesh_size_min_um |
gmsh | Smallest element |
verbose |
False |
Show gmsh's output |
mesh.json records the sizes used.
How the default edge size does on the ihp-sg13g2 test design overlap_plates_100um_x_100um_m1_m2 (LOWER–UPPER, Elmer):
| Edge size | Tetrahedra | C |
|---|---|---|
| 0.84 µm | 54k | 182.5 fF |
| 0.42 µm (default: Metal1) | 94k | 181.3 fF |
| 0.21 µm | ~180k | 180.7 fF |
How the mesh is built
- Occupancy: the domain is sliced at every z where a solid starts or ends. Per slab, conductors and the ground plane claim their regions first, then the dielectrics by wrap depth, then the background. The resulting prisms fill the domain exactly once.
- Conformal films: grow along their WRAPS chain, as PEX25D specifies. A film wrapping a film that covers the field lies on top of it there.
- Conformal mesh: the prisms are extruded with OpenCASCADE and fragmented, so touching solids share faces.
Requirements
klayout-pex>=0.10.0,<1(plugin APIv1is provisional)- gmsh ≥ 4.12. IIC-OSIC-TOOLS provides 4.12.1 from APT, and PyPI has no Linux aarch64 wheel, so the code sticks to the 4.12 API.
Development
poetry install
poetry run pytest
Acknowledgements
This project is funded by the JKU/SAL IWS Lab, a collaboration of Johannes Kepler University and Silicon Austria Labs.
This project is further funded by the European project ODE4EC-AMS, which has received funding from the Chips Joint Undertaking (Chips JU) under Grant Agreement No 101252962.
Funded by the European Union. Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the Chips Joint Undertaking. Neither the European Union nor the granting authority can be held responsible for them.
Metadata
Release files for klayout-pex-plugin-gmsh 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| klayout_pex_plugin_gmsh-0.2.0.tar.gz | 26.8 kB | With provenance | Details for klayout_pex_plugin_gmsh-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| klayout_pex_plugin_gmsh-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for klayout_pex_plugin_gmsh-0.2.0-py3-none-any.whl |
Total release size: 57.3 kB
Release files / klayout_pex_plugin_gmsh-0.2.0.tar.gz
| Download URL | klayout_pex_plugin_gmsh-0.2.0.tar.gz |
|---|---|
| Size | 26.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1d3747e04223b0ebad49beca0ba7a0eb6828ce4b10bea21d2cae9c933cb9c5ab
|
|
BLAKE2b-256 checksum How to use checksums |
3568654bc4a4743f40680753214af5707b085b0e7ddeb13ae591bedfabaf002e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.
Transparency logRelease files / klayout_pex_plugin_gmsh-0.2.0-py3-none-any.whl
| Download URL | klayout_pex_plugin_gmsh-0.2.0-py3-none-any.whl |
|---|---|
| Size | 30.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe32b5e821ea07242fc7a1264fbd0811144509ba345eb006a3baec999134ffad
|
|
BLAKE2b-256 checksum How to use checksums |
50da08ed20cc9b282e00df834b2bc67fa83910f7cc506d6fbd4d5dff5adec082
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.
Transparency logSecurity for klayout-pex-plugin-gmsh 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for klayout_pex_plugin_gmsh-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.