Commit Graph

7 Commits

Author SHA1 Message Date
janik 49f682364f Follow the LICENSE.txt -> LICENSE rename in README and package build
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 17:24:47 +07:00
janik 14cdf4c7ee Add balanced quadtree grid engine (adaptive cells, phase 1)
fill_resistance/quadtree.py decomposes a layer's fine copper mask into
2:1-balanced power-of-two leaves: boundary and keep-fine cells stay at
the fine size, interiors coarsen with their Chebyshev distance to the
nearest feature (guard factor, default 4), and an explicit enforcement
pass splits any leaf more than twice an edge-adjacent neighbor. Face
conductances use the series-half-cell rule, which reduces to the
production harmonic mean for equal sizes and EXACTLY to sigma in the
uniform limit - verified edge-for-edge against solver.build_edges and
to rel 1e-12 in R against run_solve, so the exact-value test suite
stays authoritative for this engine.

Measured (feature-dense 120x120 plate, h=50um, production AMG solver):
uniform 5.58M unknowns ~35s; adaptive guard=4 823k / ~8s at -1.1%;
guard=8 1.74M / ~12s at -0.47%. tools/adaptive_proto.py now benchmarks
the engine itself.

Not yet wired into the pipeline: phase 2 ports electrodes, barrels,
1D chains, buildup and field output onto leaves.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 17:05:31 +07:00
janik b68115b4aa Add validated quadtree-adaptive grid prototype with benchmark numbers
Proves the design for true adaptive cell sizes: bottom-up coarsening of
the existing fine raster into power-of-two leaves (erosion-graded),
vectorized leaf-graph construction whose uniform limit reproduces the
production grid exactly (rel diff 0), solved with the production
assembly + AMG. On an adversarial 5.6M-cell geometry: 12x fewer
unknowns at -0.42% R (27 s -> 3 s) up to 26x at -2.1%.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 16:54:16 +07:00
janik 4e39f598a5 Add GPL-3.0 license, PCM packaging, and cross-platform deploy
- LICENSE.txt (GPL-3.0-or-later), declared in the new PCM v2
  metadata.json (validated against the official schema)
- tools/build_package.py builds the registry-layout addon zip in dist/
  plus the submission metadata copy with sha256/sizes and a release
  download_url derived from the Gitea homepage
- tools/deploy.py: symlink/copy deploy for Linux, macOS and Windows
- 64 px resources/icon.png for the PCM listing
- README: Linux setup/dev commands, packaging and license sections

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 14:55:24 +07:00
janik 99a06d533b Redraw toolbar icons: full-canvas copper ohm glyph, add generator
The previous 24 px icons were a copper square with a tiny knocked-out
ohm that was unreadable in the toolbar. tools/gen_icons.py renders the
glyph supersampled from DejaVu Sans Bold in theme-specific copper
shades (plus the 64 px PCM listing icon).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 14:55:09 +07:00
janik 33489c7851 Finish smoke/ -> tools/ rename: update probe wording and deploy exclude
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 14:55:09 +07:00
janik e7627352c1 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>
2026-07-15 14:54:45 +07:00