HASEonGPU.MeshTopology
- class HASEonGPU.MeshTopology(points, trianglePointIndices, levels=None, thickness=None, metadata=<factory>)
Bases:
objectTriangular base mesh extruded through z levels into wedge prisms.
pointsare transverse(x, y)coordinates.trianglePointIndicesconnect those points into the 2D base mesh.levelsandthicknessdescribe the z sampling used bybetaCellsandbetaVolume.- Parameters:
points (ndarray)
trianglePointIndices (ndarray)
levels (int | None)
thickness (float | None)
metadata (dict)
- points: ndarray
Transverse coordinates with shape
(numberOfPoints, 2).
- trianglePointIndices: ndarray
Triangle vertex indices with shape
(numberOfTriangles, 3).
- levels: int | None = None
Number of z sample planes; at least two when simulation data is used.
- thickness: float | None = None
Distance between adjacent z sample planes.
- metadata: dict
Importer or construction metadata kept for tooling and round-trips.
- classmethod fromPoints(points, numberOfLevels=None)
Delaunay-triangulate transverse points into a
MeshTopology.
- classmethod fromGrid(grid)
Construct topology from a regular
Gridhelper.
- classmethod fromGmsh(gmsh, *, numberOfLevels=None, thickness=None)
Import a planar gmsh triangle mesh and attach z sampling.
- classmethod fromFile(filename, format=None, numberOfLevels=None, thickness=None)
Load supported mesh formats: legacy VTK, planar STL, or gmsh.
- numberOfLevels(levels)
Set the number of z sample planes and return
self.
- withThickness(thickness)
Set the spacing between adjacent z levels and return
self.
- levelCoordinates()
Return z coordinates for every level as
0, thickness, ....
- pointIndexAt(x, y, *, tol=1e-12)
Return the topology point index for a transverse coordinate.
- levelIndexAt(z, *, tol=1e-12)
Return the z-level index for a physical z coordinate.
- betaCellIndexAt(x, y, z, *, tol=1e-12, flat=False)
Return the
betaCellsindex for a physical(x, y, z)point.
- property numberOfTriangles
Number of base triangles, and therefore prisms per z interval.
- property numberOfPoints
Number of transverse sample points per z level.
- property numberOfPrisms
Total number of wedge prisms in the extruded mesh.
- asGainMedium()
Wrap this topology in an empty
GainMedium.