Fix solver correctness and input-validation issues from code review
- Refuse the uniform contact model when the fills form multiple disconnected copper groups that each touch both terminals: the prescribed injection split is ill-posed and the grounded system was singular, silently returning garbage (e.g. negative gigaohms). connected_restrict now reports the component count; a power-balance backstop (SolverError) catches any other inconsistent solve. - Connect via/pad barrels to the nearest fill copper within the pad footprint (+1 cell) instead of only the exact center cell, so thermal-relief spokes still stitch layers; barrels that reach fill on fewer than two layers are warned about. ViaLink gains pad_nm (extracted from the padstack, JSON-roundtripped). - Validate dialog input on OK (layers, current > 0, cell > 0, parseable frequency, extra Cu >= 0) with an inline error instead of silently substituting defaults; parse_frequency raises on garbage; pipeline rejects i_test <= 0; choose_cell_size rejects non-positive overrides. - Warn when a contact part is dropped by the connectivity restriction; floor instead of truncate in cell_of; correct the uniform-model summary line; drop an unused variable; refresh plugin.json wording. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -102,8 +102,11 @@ def write_summary(outdir: Path, problem: Problem, stack: RasterStack,
|
||||
f"solver: {info.method}"
|
||||
+ (f", {info.iterations} iters, residual {info.residual:.2e}"
|
||||
if info.iterations is not None else ""),
|
||||
f"I1/I2 @ 1V: {result.I1_a:.9g} / {result.I2_a:.9g} A "
|
||||
f"(mismatch {result.mismatch_rel:.2e})",
|
||||
(f"I1/I2 @ 1V: {result.I1_a:.9g} / {result.I2_a:.9g} A "
|
||||
f"(mismatch {result.mismatch_rel:.2e})"
|
||||
if result.contact_model == "equipotential" else
|
||||
f"solve residual: {result.mismatch_rel:.2e} "
|
||||
f"(KCL, prescribed injection)"),
|
||||
f"timings [s]: "
|
||||
f"{', '.join(f'{k}={v:.2f}' for k, v in result.timings.items())}",
|
||||
"",
|
||||
|
||||
Reference in New Issue
Block a user