mesh
¶
Mesh transfer from the shared native-2D pipeline to DEVSIM.
The BoundaryMode pipeline writes the cross-section mesh in um (msh v2.2).
DEVSIM's silicon physics parameters are cm-based, so the same mesh is
rewritten with coordinates scaled to cm before create_gmsh_mesh loads
it. Physical groups (region and contact names) are preserved verbatim —
this is a unit conversion, not a second meshing path.
Functions:
-
line_group_points–Node coordinates of a named dim-1 physical group of a gmsh mesh.
-
write_scaled_msh–Write a copy of a gmsh v2.2 mesh with scaled node coordinates.
line_group_points
¶
Node coordinates of a named dim-1 physical group of a gmsh mesh.
Parameters:
Returns:
-
NDArray[float64]–The
(n, 2)in-plane coordinates of the group's distinct nodes, -
NDArray[float64]–in the mesh's own unit.
Raises:
-
ValueError–When the mesh holds no line group of that name, or no line cells at all.
write_scaled_msh
¶
Write a copy of a gmsh v2.2 mesh with scaled node coordinates.
Parameters:
-
src(str | Path) –Source mesh path (msh v2.2, coordinates in um).
-
dst(str | Path) –Destination mesh path.
-
scale(float, default:UM_TO_CM) –Multiplicative coordinate scale (default um -> cm).
Returns:
-
Path–The destination path.