Skip to content

Releases: VolkovIlia/semiflow

v0.12.0-beta — implicit stiff mode for SymmetricOperator (#16)

Choose a tag to compare

@VolkovIlia VolkovIlia released this 02 Jul 20:04

Implicit Stiff Mode for SymmetricOperator

The new path="implicit" option adds a dependency-free preconditioned-CG backward-Euler solver for externally-assembled symmetric operators, resolving the O(λ_max·t) timeout on stiff FEM operators.

Highlights

  • Flagship benchmark: ~4 ms / sup_error 3.3e-12 on a Neumann N=400 ×10⁷ stiff operator
    • Compare: explicit Lanczos ~56 s, scipy expm_multiply >90 s timeout
  • Cost caveat: governed by √κ of Jacobi-preconditioned system, not strictly λ_max-independent
  • Zero new dependencies: PCG + Jacobi preconditioning are dependency-free
  • API: SymmetricOperator.evolve_batched, mass_lumped_evolve, MassKOperator.evolve all support path="implicit"

CI Hardening

Alongside the #16 feature:

  • Flagship Gates: Resolvent argument parsing + bounded L_RESOLVENT tick budget turned green
  • Nightly miri: Scalar path (src/scalar/) validated
  • Nightly bench-regression: Scoped core families + baseline guard to prevent false positives

Full Changelog

See CHANGELOG.md for complete details.

v0.11.0-beta — Python bindings for the 0.10.0 wave (#15)

Choose a tag to compare

@VolkovIlia VolkovIlia released this 27 Jun 18:57

[0.11.0-beta] — 2026-06-27

Python binding surface for the 0.10.0-beta feature wave (#11#14 + A1).
Issues #11, #12, #13, #14, and the graph Krylov additions from the 0.10.x patch
series are now usable from Python via the semiflow-pde wheel. No breaking
changes to the existing Python surface or the Rust public API.

Added (Python bindings, #15)

  • SymmetricOperator.from_csr / SymmetricOperator.evolve_batched
    externally-assembled symmetric PSD sparse operators (FEM stiffness, Robin BC)
    accepted as CSR arrays; batched time-stepping across multiple right-hand sides.
  • symmetric_op_expmv_frechet — combined matrix-exponential action +
    per-entry Fréchet gradient in one call. EntrySensitivity is not exposed as a
    separate Python class; the gradient is returned directly from this function.
  • MassKOperator / mass_lumped_evolve — generalized-eigenproblem (M, K)
    propagation via the congruence chain  = R⁻ᵀKR⁻¹; lumped-mass 3-liner path.
  • ConservativeDiffusionChernoff / assemble_conservative_csr_1d
    conservative divergence-form diffusion with harmonic-mean face conductivities;
    to_symmetric_operator() bridge to the Krylov engine.
  • phi_action / phi_action_batched / Etdrk4 — ETD φ-functions and the
    Cox–Matthews ETDRK4 semilinear integrator. Nonlinearity is menu-based
    (AllenCahn, Burgers, GrayScott, KuramotoSivashinsky); arbitrary
    per-step Python callbacks are deferred (ADR-0179 / ADR-0189 wall preserved).
  • Laplacian.from_csr — direct CSR-based Laplacian construction path.
  • PEP 561 stubs updated to cover all new symbols; 16/16 smoke tests green.

Changed

  • Registry metadata: Changelog and Release Notes links now appear on the
    PyPI sidebar (semiflow-pde [project.urls]), the crates.io semiflow page
    (README ## Changelog section), and the npm @semiflow/wasm page
    (README ## Changelog / Release notes section).

v0.10.2-beta — Lanczos OOB fix at t≥4

Choose a tag to compare

@github-actions github-actions released this 27 Jun 18:22

Fixed

Lanczos OOB panic at t≥4 (graph_krylov)

  • Off-by-one bug: wrote past MAX_LANCZOS_DIM=18 when Krylov dimension maxed out at large t·λ_max
  • Bug present since A1/ADR-0185; only triggered at deep t
  • Fix: Lanczos now matches Chebyshev/dense expm at t∈{4,8,16} (max|Δ|≤1e-9, no panic)
  • Gate lanczos_large_t_no_oob validates the fix
  • The --no-lanczos workaround is no longer needed

Clippy cast_precision_loss in graph_par_speedup example

  • Cleaned up compiler warning in --all-targets build

See CHANGELOG.md for full context.

v0.10.1-beta — Channel-parallel graph path (multicore)

Choose a tag to compare

@github-actions github-actions released this 27 Jun 17:35

Performance

Channel-parallel graph evolve

  • ADR-0184 D3: evolve_batched and batched adjoint now split channels across cores via std::thread::scope
  • Gated behind parallel feature (C≥2); each worker has its own ScratchPool
  • Graph Krylov ML path was previously single-threaded (parallel feature only covered Strang2D/3D grid kernels)
  • Bit-identical to serial (0-ULP; forward + ascending-index gradient reduction per ADR-0184 D4/D5)
  • Measured ~5–6× on i7-12700K (612–1942% CPU)
  • Closes the "speed" half of the memory↔speed contradiction for graph diffusion / SSM layers

See CHANGELOG.md for full technical details and gate validation.

v0.10.0-beta — Krylov/Fréchet ML backend + 4 issues (#11/#12/#13/#14)

Choose a tag to compare

@github-actions github-actions released this 27 Jun 10:42

Summary

Five-feature wave (issues #11, #12, #13, #14 + A1 stiff fix): generic symmetric operators, conservative divergence-form diffusion, stiff multilayer conduction, ETD/φ semilinear integrator, and depth-independent Krylov + Fréchet for graph semigroups. All additive; no breaking changes to the 0.9.1-beta public surface.

Added

A1/A2 — Depth-independent graph-semigroup Krylov action + edge-weight Fréchet gradient

  • GraphKrylovChernoff, graph_expmv_frechet; ADR-0185, math §54
  • graph_expmv(L, v, t, ε) computes e^{−tL_G}·v without stepping through each time unit
  • Chebyshev default (O(1) working vectors) or Lanczos adaptive (O(m·N) basis, m ≈ 20–40, flat in t)
  • graph_expmv_frechet returns ∂J/∂w for all edge weights via one augmented Krylov solve (Al-Mohy & Higham 2009)
  • Closes forward and backward speed ceilings exposed by v0.9.1-beta (#10)
  • PyO3: GraphKrylov pyclass + graph_expmv_frechet pyfunction in one GIL-releasing call
  • Honest limits: symmetric L_G only; time-varying L(t) out of scope

#13 — Generic externally-assembled symmetric-operator entry point

  • SymmetricOperator, MassKOperator, EntrySensitivity; ADR-0186, math §55
  • SymmetricOperator::from_csr accepts any externally-assembled symmetric PSD sparse operator
  • FEM stiffness with Robin BC, anisotropic conductivity — not just graph Laplacians
  • MassKOperator propagates e^{−τM⁻¹K}·v via congruence chain without forming M⁻¹K explicitly
  • Lumped (M,K) path is a 3-liner
  • Honest limits: symmetric PSD required; consistent-mass differentiability deferred

#11 — Conservative (divergence-form) variable-coefficient diffusion

  • ConservativeDiffusionChernoff, assemble_conservative_csr_1d; ADR-0187, math §56
  • Harmonic-mean face conductivities reproduce series-resistance network at machine precision
  • Handles sharp material interfaces (k-contrast 100:1 to 3025:1) where non-conservative methods give ≥50% error
  • Crank–Nicolson wrapper (order()=2, A-stable, no CFL, one O(n) Thomas solve)
  • Honest limits: k > 0; full-tensor non-separable ∂_x(k∂_y) out of scope

#14 — Stiff multilayer conduction via mass-weighted Krylov

  • MultilayerStack, multilayer_evolve, MassWeightedConservativeChernoff; ADR-0188, math §57
  • Maps physical [(thickness, k, ρc)] → node arrays on single uniform grid
  • Propagates in one depth-flat Krylov action for any integration span
  • Beats explicit CFL by ~28000× on Shuttle TPS stack (k-contrast ≈ 3025×, ρc-contrast ≈ 27×)
  • Optional A-stable CN convenience for O(1)-vector memory
  • Honest limits: 1-D first; one global dx; node-centered lumped mass only

#12 — ETD φ-functions and ETDRK4 semilinear integrator

  • phi_action, phi_action_batched, Etdrk4, Nonlinearity; ADR-0189, math §58
  • phi_action_batched computes φ₀…φ_p(τA)·v simultaneously via ONE augmented block-triangular matvec-only Taylor action
  • Etdrk4 (Cox–Matthews 2002 / Kassam–Trefethen 2005) integrates ∂ₜu = Lu + N(u) at order 4
  • N(u) is declarative Nonlinearity trait or fixed enum menu (AllenCahn, Burgers, GrayScott, KuramotoSivashinsky)
  • Never a per-step Python callback; ADR-0179 wall preserved
  • NonlinearityDiff enables end-to-end adjoint ∂J/∂param through one step
  • Honest limits: L 1-D divergence-form or symmetric graph only; deferred beyond this scope

Fixed

A1 stiff operator NaN bug (commit 9e5f557)

  • GraphKrylovChernoff's Chebyshev path silently returned garbage for stiff operators (λ_max ≳ 1400)
  • Fix: substep s = ⌈z/Z_SAFE⌉ (Z_SAFE = 200), mirroring Lanczos scaling
  • Plus fail-loud finiteness guard returning SemiflowError::DomainViolation
  • Conservative high-contrast diffusion (λ_max ∼ 10⁴) was affected
  • New test cheb_stiff_regime (z ≈ 6400) was red before, green after (sup_error 1.0e-11)

See CHANGELOG.md for ADRs, validation gates, and complete honest limitations.

v0.9.1-beta

Choose a tag to compare

@github-actions github-actions released this 26 Jun 09:23
semiflow v0.9.1-beta

v0.9.0-beta.3

Choose a tag to compare

@github-actions github-actions released this 25 Jun 08:14
semiflow v0.9.0-beta.3

v0.9.0-beta.2

Choose a tag to compare

@github-actions github-actions released this 25 Jun 00:44
semiflow v0.9.0-beta.2

v0.9.0-beta.1

Choose a tag to compare

@github-actions github-actions released this 24 Jun 06:50
Release v0.9.0-beta.1 — manylinux x86_64 + macOS arm64 + Windows whee…