Fix swarm-review findings: empty-layer crashes, teardrop fills, Jmag
- adaptive: skip layers with zero quadtree leaves in the connectivity restriction and mesh-boundary loops (IndexError on boards where a selected layer has no copper) - board_io: accept ZT_TEARDROP zones as conducting copper (KiCad types teardrop fills ZT_TEARDROP, never ZT_COPPER, so they were dropped) - geometry: copper_bbox uses the exact stroke bbox (centerline extrema + half width) instead of a 100 um chord tessellation that could undershoot arc/cap extrema past the raster guard margin - solver/adaptive: reference |J| to the conduction-equivalent thickness sigma*rho in every branch (the uniform branch used geometric t, so AC plots changed scale ~rs_ratio depending on unrelated per-cell maps) - solver/adaptive/raster: chain cells no longer show phantom sheet-face currents; store dl per chain link and overlay the true 1D density |dV|/(rho*dl) (exact at any frequency: AC scaling of link conductance and cross-section cancels) - test_quadtree: compare edge lists pair-for-pair (the independent column sort destroyed endpoint association)
This commit is contained in:
@@ -56,13 +56,13 @@ def test_uniform_limit_graph_identical():
|
||||
ny, nx = stack.shape2d
|
||||
flat_of_leaf = grid.y0.astype(np.int64) * nx + grid.x0
|
||||
ia, ib, g = quadtree.leaf_edges(grid, p.sigma_s(0))
|
||||
ours = np.sort(np.stack([
|
||||
ours = np.stack([
|
||||
np.minimum(flat_of_leaf[ia], flat_of_leaf[ib]),
|
||||
np.maximum(flat_of_leaf[ia], flat_of_leaf[ib])], axis=1), axis=0)
|
||||
np.maximum(flat_of_leaf[ia], flat_of_leaf[ib])], axis=1)
|
||||
|
||||
edges = solver.build_edges(stack, p, [p.sigma_s(0)])
|
||||
ref = np.sort(np.stack([np.minimum(edges.a, edges.b),
|
||||
np.maximum(edges.a, edges.b)], axis=1), axis=0)
|
||||
ref = np.stack([np.minimum(edges.a, edges.b),
|
||||
np.maximum(edges.a, edges.b)], axis=1)
|
||||
assert ours.shape == ref.shape
|
||||
assert np.array_equal(np.sort(ours.view("i8,i8"), order=["f0", "f1"],
|
||||
axis=0),
|
||||
|
||||
Reference in New Issue
Block a user