Planar normalization API
pyvoro2.planar.normalize
Planar topology-level post-processing utilities.
NormalizedTopology
dataclass
Result of :func:normalize_topology for planar tessellations.
Attributes:
| Name | Type | Description |
|---|---|---|
global_vertices |
ndarray
|
Unique planar vertices in Cartesian coordinates. |
global_edges |
list[dict[str, Any]]
|
Unique geometric edges. Each edge dict contains: - cells: (cid0, cid1) - cell_shifts: ((0, 0), (sx, sy)) - vertices: (gid0, gid1) - vertex_shifts: ((0, 0), (sx, sy)) |
cells |
list[dict[str, Any]]
|
Per-cell dictionaries including |
NormalizedVertices
dataclass
Result of :func:normalize_vertices for planar tessellations.
Attributes:
| Name | Type | Description |
|---|---|---|
global_vertices |
ndarray
|
Array of unique planar vertices in Cartesian coordinates, remapped into the primary cell for periodic domains. |
cells |
list[dict[str, Any]]
|
Per-cell dictionaries augmented with: - vertex_global_id: list[int] aligned with local vertices - vertex_shift: list[tuple[int, int]] aligned with local vertices |
normalize_edges(nv, *, domain, tol=None, copy_cells=True)
Build a global edge pool based on an existing planar normalization.
normalize_topology(cells, *, domain, tol=None, require_edge_shifts=True, copy_cells=True)
Convenience wrapper: normalize vertices, then deduplicate edges.
normalize_vertices(cells, *, domain, tol=None, require_edge_shifts=True, copy_cells=True)
Build a global planar vertex pool and per-cell vertex mappings.
:::