0de750bad1164206ec5ab5902c3bf7f3c6bfd091
164
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
03a9bdf41f |
rtx-cfd: apply boundary conditions to u* before using its divergence
CI / Test (ubuntu-latest) (push) Canceled after 0s
CI / Build CPU-Only (Explicit) (push) Canceled after 0s
CI / Python Bindings (maturin) (macos-latest) (push) Canceled after 0s
CI / Python Bindings (maturin) (ubuntu-latest) (push) Canceled after 0s
CI / WASM Build + Size Check (push) Canceled after 0s
CI / Distributed Training Tests (push) Canceled after 0s
CI / CI Success (push) Canceled after 0s
Documentation / Build API Documentation (push) Canceled after 0s
Documentation / Build User Guide (push) Canceled after 0s
Performance Benchmarks / Run Benchmarks (push) Canceled after 0s
CI / Format Check (push) Canceled after 0s
CI / Clippy Check (push) Canceled after 0s
CI / Build (macos-latest) (push) Canceled after 0s
CI / Build (ubuntu-latest) (push) Canceled after 0s
CI / Test (macos-latest) (push) Canceled after 0s
Closes the relaxation-factor dependence. Converged solutions are now
identical for velocity relaxation 0.3, 0.5, 0.7 and 0.9 -- bit for bit --
where they previously spread 18%.
The cause was ordering, not formulation. Boundary conditions were applied
only at the end of the iteration, so `copy_to_starred` snapshotted a
predicted field whose boundary faces held whatever the momentum sweep had
written there: values the wall overwrote with zero moments later. The
divergence of that field is the pressure equation's source, so those
un-constrained faces entered it as a spurious mass source, concentrated at
the two lid corners where the moving lid meets a stationary wall. The
swept value scales with the relaxation factor, so the spurious source did
too -- and so did the answer.
Diagnosis is worth recording because the symptom pointed away from the
cause. At the stalled state the interior momentum equations were satisfied
to machine precision at every relaxation factor: a fresh Gauss-Seidel
sweep moved the interior by 1e-15, the pressure correction was 1e-14, and
the momentum residual was 3.6e-16. The entire residual floor lived in the
*mass* term, and only that term varied with alpha -- 3.7e-4 at 0.3 against
1.6e-4 at 0.9. Each relaxation factor was converging honestly, to the
solution of a slightly different problem.
The correction also moves the cavity substantially closer to the reference,
because the spurious corner source had been suppressing the recirculation:
grid before after Ghia (1982)
17^2 -0.068 -0.123 -0.2109
33^2 -0.109 -0.154
65^2 -0.142 -0.174
97^2 -0.157 -0.182
Richardson extrapolation on the two finest grids now gives about -0.199
against Ghia's -0.2109, within 6%, with the remaining gap consistent with
first-order upwind's numerical viscosity. The residual floor falls roughly
linearly with mesh size (1.6e-3, 5.2e-4, 1.6e-4, 7.8e-5), which is the
signature of the corner singularity rather than of an unconverged solve --
the same one Botella & Peyret (1998) subtract analytically.
Two further fixes fell out of it:
- The solver returned NaN rather than reporting divergence. Asked for an
8x8 cavity at a Reynolds number of a million it now stops, says it did
not converge, and reports the last finite residual, instead of handing
back a field of NaN that poisons everything downstream. Previously the
false transient's large diagonal damped that case into crawling rather
than diverging, which hid it.
- `apply_boundary_condition` used `start_index` where it meant
`end_index` for the bottom wall. The other three arms are correct; with
both indices unset the default masked it.
558 tests across the three crates, 0 failing.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
||
|
|
2db4e28760 |
rtx-cfd: make SIMPLE a steady solver; the converged answer no longer depends
Performance Benchmarks / Run Benchmarks (push) Canceled after 0s
CI / Format Check (push) Canceled after 0s
CI / Clippy Check (push) Canceled after 0s
CI / Build (macos-latest) (push) Canceled after 0s
CI / Build (ubuntu-latest) (push) Canceled after 0s
CI / Test (macos-latest) (push) Canceled after 0s
CI / Test (ubuntu-latest) (push) Canceled after 0s
CI / Build CPU-Only (Explicit) (push) Canceled after 0s
CI / Python Bindings (maturin) (macos-latest) (push) Canceled after 0s
CI / Python Bindings (maturin) (ubuntu-latest) (push) Canceled after 0s
CI / WASM Build + Size Check (push) Canceled after 0s
CI / Distributed Training Tests (push) Canceled after 0s
CI / CI Success (push) Canceled after 0s
Documentation / Build API Documentation (push) Canceled after 0s
Documentation / Build User Guide (push) Canceled after 0s
on the pseudo-time step Acting on a literature pass. Standard SIMPLE is a steady-state algorithm: it has no pseudo-time term, and stability comes from under-relaxation folded implicitly into the momentum coefficients. Ours had a false transient *and* an explicit post-hoc blend of the whole field, which is why the converged cavity solution varied with `time_step` -- something a steady state cannot legitimately do. Four changes, in the order they mattered: 1. The convergence measure was `|u - u_old|`, the change between successive iterates. That is not a residual: it reports how far the iteration moved, which depends on how heavily it is damped, and the damping was set by `dt`. Replaced with the imbalance of the discretised momentum equations, `|a_p u_P - sum a_nb u_nb - b|`, normalised by `sum |a_p u_P|` as CFD solvers conventionally report it. An unnormalised sum grows with the cell count and with `dt` through `a_p0`, so the same numeric tolerance meant a different thing on every grid. The residual is measured against the *unrelaxed* equation. Relaxation inflates the diagonal by 1/alpha and adds a matching source; reporting the relaxed system's residual makes one tolerance correspond to a different true error for each alpha. 2. Steady by default: `a_p0 = 0`, and Patankar's implicit under-relaxation -- `a_p / alpha` with `(1-alpha)/alpha * a_p * u_prev` added to the source. At a fixed point the two cancel exactly, so the converged solution is independent of alpha by construction. The explicit velocity blend is removed; it relaxed a second time and undid part of the continuity the pressure correction had just enforced. `steady: false` restores the transient term for genuinely time-dependent problems. Result: dt = 0.001, 0.01 and 0.05 now give bit-identical fields. 3. Dropped the net convective flux from `a_p`. It vanishes identically once continuity holds, but during the iteration it does not, and it can exceed the sum of the neighbour coefficients -- driving `a_p` through zero and the solve to NaN, which is what the workflow tests hit once `a_p0` was no longer there to mask it. Omitting it is what makes `a_p = sum a_nb` positive unconditionally. 4. Anchored one cell of the pressure correction. With velocity prescribed on every boundary the pressure equation is pure Neumann and singular; `p'` is fixed only up to a constant and Gauss-Seidel lets it drift. Enforcing solvability by subtracting the mean source is the textbook remedy and is wrong here -- this source is assembled from face fluxes that include the boundaries, so it need not sum to zero, and subtracting its mean injects a spurious source everywhere. Tried; it diverged. Anchoring a reference cell changes no pressure gradient, which is all the momentum equation uses. Also measured, and it settles the open question about Ghia: the under-prediction is numerical diffusion, not a defect. First-order upwind carries a numerical viscosity of about |u| dx / 2, which at 65^2 is 0.0078 against a physical 0.01 -- an effective Reynolds number near 56, not 100. Refinement moves the centreline minimum monotonically toward the reference: -0.068 at 17^2, -0.109 at 33^2, -0.142 at 65^2, -0.157 at 97^2, against Ghia's -0.2109, with the vortex position tracking 0.375 -> 0.406 -> 0.469 -> 0.490 against Ghia's 0.4531. The cavity test moves to 65^2 and asserts the vortex position tightly (0.40..0.52, Ghia 0.4531) while bounding the strength to the band first-order upwind can reach there. Its tolerance is 1e-4 rather than 1e-6: the two lid corners hold a velocity discontinuity whose discrete imbalance does not reduce with iteration, so the normalised residual floors near 7e-5. That is a property of the problem -- the same singularity Botella & Peyret (1998) subtract analytically -- and the physical assertions, not the stopping rule, are what establish correctness. Still open: converged solutions retain a dependence on the relaxation factor that the implicit formulation should have removed (-0.159 at alpha=0.3 against -0.134 at alpha=0.9 on 65^2, each stable to six decimals over 200k iterations). Recorded rather than papered over. 558 tests across the three crates, 0 failing. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> |
||
|
|
bfd9f4dfd2 |
rtx-cfd: repair the pressure-velocity coupling, LBM walls and mesh quality
Performance Benchmarks / Run Benchmarks (push) Canceled after 0s
CI / Format Check (push) Canceled after 0s
CI / Clippy Check (push) Canceled after 0s
CI / Build (macos-latest) (push) Canceled after 0s
CI / Build (ubuntu-latest) (push) Canceled after 0s
CI / Test (macos-latest) (push) Canceled after 0s
CI / Test (ubuntu-latest) (push) Canceled after 0s
CI / Build CPU-Only (Explicit) (push) Canceled after 0s
CI / Python Bindings (maturin) (macos-latest) (push) Canceled after 0s
CI / Python Bindings (maturin) (ubuntu-latest) (push) Canceled after 0s
CI / WASM Build + Size Check (push) Canceled after 0s
CI / Distributed Training Tests (push) Canceled after 0s
CI / CI Success (push) Canceled after 0s
Documentation / Build API Documentation (push) Canceled after 0s
Documentation / Build User Guide (push) Canceled after 0s
Clears the rest of the quarantine. All three crates now run 558 tests
with 0 failures and no `#[ignore]` markers.
SIMPLE could not converge, and the reason was not slow convergence but
wrong physics.
The pressure correction equation used a bare Laplacian, 1/dx^2 and
1/dy^2, while the velocity correction divided by a_p = rho dx dy / dt.
SIMPLE requires these to be each other's inverse: substituting the
corrected velocities into continuity must reproduce the pressure
equation, which fixes a_E = rho d dy/dx with d = dV/a_p. The two
disagreed by roughly 1/(h^2 dt) -- about 2e4 on a 16x16 cavity -- so the
pressure correction was that many times too weak to enforce continuity.
The consequence was visible and specific. A lid-driven cavity at Re=100
produced a monotonic profile rising from 0 at the floor to 1 at the lid:
Couette flow, with no recirculation anywhere, and a peak pressure of
1.6e-4 against the rho U^2 scale of 1. The return flow in a cavity is
driven entirely by the pressure gradient, so with the pressure pinned
near zero there was nothing to turn the flow around. With the
coefficients made consistent the profile recirculates, the peak pressure
is 2.9, and the solver converges.
Also in SIMPLE:
- `p'` was never reset between outer iterations. It is a correction
that `pressure_update_step` folds into `p`, so carrying it forward
applied the same correction twice.
- The convergence measure was the inner Gauss-Seidel residual, which
goes to zero whether or not the flow satisfies continuity. Now the
mass imbalance.
- The velocity correction used only the transient part of a_p,
`rho dV/dt`, rather than the diagonal the momentum equation was
actually solved with.
- All four convective face fluxes were computed from a single
cell-centred velocity, so `fe` and `fw` were the same number, as were
`fn` and `fs`. Upwinding then picked the same direction on opposite
faces of the control volume. Now interpolated per face on the
staggered grid.
Not claimed: agreement with Ghia, Ghia & Shin (1982). The vortex centre
moves toward their y = 0.4531 under refinement (0.400 at 16^2, 0.419 at
32^2, 0.460 at 64^2) but the minimum centreline velocity reaches only
-0.130 against their -0.2109, and the converged field still depends
slightly on the pseudo-time step, which a true steady state cannot. The
cavity test therefore asserts what is established -- convergence,
recirculation, vortex position, and an O(1) pressure field -- and the
remaining gap is recorded in omni-cortex/docs/solver_status.md rather
than papered over with a loose tolerance.
LBM bounce-back was doing neither of the things its name claims. It was
written as assignment (`f[2] = f[4]`) rather than a swap, discarding the
population being reflected -- bounce-back is a permutation and conserves
mass exactly, so the domain leaked 0.013% of its mass every 100 steps and
would have kept draining. And the pairs used were 5<->8 and 6<->7, which
reverse only the wall-normal component: that is specular reflection, a
free-slip wall, so the no-slip condition the walls were supposed to
impose never held.
Mesh quality:
- Quadrilateral aspect ratio included the diagonals in the maximum but
not the minimum, so it could never return 1: a unit square reported
sqrt(2) and a 2:1 rectangle sqrt(5).
- Triangle aspect ratio used longest-over-shortest edge, which does not
detect the failure mode that matters. A sliver with vertices (0,0),
(10,0), (5,0.1) scores 2.0 -- indistinguishable from a healthy 2:1
triangle -- while its area is a twentieth of what its edges suggest.
Now the radius ratio R/2r, which is 1 for equilateral and 1250 for
that sliver, and which also fixes the quality histogram.
- StructuredMesh aspect ratio took bounding-box extents and guarded the
z-extent with `.max(1e-10)`. On a 2-D mesh the depth is exactly zero,
so the guard became the minimum and a unit square reported 2e10.
Mesh refinement produced meshes that failed their own validation.
`subdivide_triangle` reserved midpoint ids as `next_node_id + k`, then
advanced the counter by 3, after which `refine_cells` called `add_node`
and advanced it three more -- so every refined cell referenced vertices
three ids away from the ones actually created. Separately, the position
lookup selected by slot rather than by id ("This is simplified, should
look up correct midpoint"), so three of four sub-triangles had their
areas computed from the wrong points; the quadrilateral version mapped
every new id to the cell centre.
Fixtures corrected rather than tolerances loosened: a structured mesh
test asserted 0.16 for the average cell volume while the comment beside
it computed 0.25 from the node-count convention the code actually uses;
the Zou-He pressure test built a *velocity* boundary at u = 1.2, far
above the lattice speed of sound, making the density negative; and the
cavity-setup test required the lid to influence the domain centre 16
rows away in 10 steps, which exceeds the lattice propagation speed.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
||
|
|
e30cfe4ce9 |
rtx-fea: repair the element library; the crate is now green with no quarantine
CI / Format Check (push) Canceled after 0s
CI / Clippy Check (push) Canceled after 0s
CI / Build (macos-latest) (push) Canceled after 0s
CI / Build (ubuntu-latest) (push) Canceled after 0s
CI / Test (macos-latest) (push) Canceled after 0s
CI / Test (ubuntu-latest) (push) Canceled after 0s
CI / Build CPU-Only (Explicit) (push) Canceled after 0s
CI / Python Bindings (maturin) (macos-latest) (push) Canceled after 0s
CI / Python Bindings (maturin) (ubuntu-latest) (push) Canceled after 0s
CI / WASM Build + Size Check (push) Canceled after 0s
CI / Distributed Training Tests (push) Canceled after 0s
CI / CI Success (push) Canceled after 0s
Documentation / Build API Documentation (push) Canceled after 0s
Documentation / Build User Guide (push) Canceled after 0s
Performance Benchmarks / Run Benchmarks (push) Canceled after 0s
Follows the assembly repair. Takes rtx-fea from 21 failures to 253 passing,
0 failing, 0 ignored, with every `#[ignore]` marker gone.
Shape function bugs, all found by one new test asserting two invariants
across the whole element library at once -- partition of unity, and that
the hand-written derivatives sum to zero. The second is the one that gets
skipped, and it is what caught Hexahedron20.
- Wedge15 summed to 2 at mid-height. Adding a node on a vertical edge
contributes L_i (1 - t^2) to the sum, so the two corners sharing that
edge must each give up half of it; the correction was absent. A
quadratic wedge that doubles every field interpolated through it.
- Hexahedron20 had sign errors in four hand-written corner
derivatives -- nodes 3 and 7 in dN/dr, nodes 1 and 5 in dN/ds. The
values were correct, so partition of unity passed; only the
derivative-sum invariant exposed it. The strain computed from this
element was wrong while its interpolation looked right.
- Quadrilateral9 emitted its shape functions in raw lexicographic
lattice order while Quad4 and Quad8 use the standard finite-element
order. A mesh written the usual way paired each node with the wrong
basis function, which at the element centre made the Jacobian exactly
singular.
- Pyramid13 was not a quadratic pyramid basis: it summed to 4 at the
element centre, and its `derivatives` allocated a 13x3 matrix then
wrote rows 13 through 15, having been copied from a sixteen-node
layout, so it panicked before the wrong values could be used. A
correct 13-node basis is rational, and there is no pyramid quadrature
rule to integrate it with, so implementing the basis alone would not
make the element usable. Both now report the gap explicitly rather
than panicking. Pyramid5 is unaffected and works.
Fixtures corrected rather than tolerances loosened:
- von Mises stress of an equal biaxial state expected 0, commented "no
deviatoric stress". Only a hydrostatic state has that. The correct
value is 100, and expecting 0 would mean a biaxially loaded sheet
could never yield. The unequal case expected |100-50|; the von Mises
stress is not a principal difference.
- A 3-point Gauss rule was required to integrate sin to 1e-10. No
correct implementation can. Replaced with a convergence assertion,
which a wrong rule cannot satisfy by luck.
- MathUtils::SMALL was asserted below EPSILON * 1000, which inverts the
relationship a practical zero-threshold needs.
- The Hex20 Jacobian test put all twelve mid-edge nodes at the origin,
commented "simplified for test". That is not a hexahedron, and its
mapping is genuinely singular; it only passed because of the
derivative sign errors above.
- ElementFactory was required to build every ElementType including
Point, which has no interpolation and is deliberately rejected.
MemoryInfo displayed decimal GB while its own test constructed binary
GiB, rendering an 8 GiB device as 8.59. Now GiB throughout.
test_mesh_has_real_algorithms searched the *text* of mesh/mod.rs for the
strings "add_node" and "add_element". It broke when those moved into
submodules, but the real problem is that a source-text search cannot tell
a working function from one returning zeros -- it passed throughout the
period when element matrices were a stub and quadrature returned no
points. Replaced with a test that builds a mesh and checks the result.
The crate doc example imported solvers::DirectSolver and
analysis::StaticAnalysis, neither of which has ever existed, so the
doctest never compiled. Replaced with a modal analysis that runs. Also
dropped the "Production Ready: No mocks, stubs, or TODOs - complete
implementation" line, and replaced it with what is actually validated and
what is not.
rtx-fsi unaffected at 26/26.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
||
|
|
4c2cea36aa |
rtx-fea: make the analysis stack produce physics, validated against closed form
The census found rtx-fea could not produce a non-zero answer for any
analysis type. Six defects sat between a correctly specified mesh and a
natural frequency, each of which alone was fatal. Every one was found by
writing the closed-form test first and confirming red.
1. Element matrices were a stub. StandardFiniteElement::
compute_element_matrices returned DMatrix::zeros for stiffness, force
and mass -- and it is what GlobalAssembler calls for every element, so
every global matrix in the crate was zero. Real quadrature-based
stiffness and mass already existed in ElementMatrixComputer; nothing
called them. Now wired, with the scalar mass matrix expanded by a
Kronecker product with the spatial identity to match the interleaved
per-node DOF layout its stiffness uses.
2. Quadrature returned no points. quadrature_rule built
QuadratureRule::new(vec![], ..). Every integration loop iterates over
rule.points, so an empty rule does not fail -- it skips the loop and
yields a zero matrix. Real Gauss rules for line, triangle, quad, tet
and hex existed unused; now dispatched by element type, with wedges as
the triangle-line tensor product and pyramids an explicit error rather
than an empty rule.
3. transform_derivatives computed J^-T * dN where dN is
(num_nodes x param_dim). By the chain rule it is dN * J^-1. The two
agree only when both are square and symmetric; for any element with
more nodes than parametric directions -- every element -- the old form
was a dimension mismatch that panicked inside BLAS.
4. MaterialDatabase::clone silently dropped every material, cloning
names only, because Box<dyn Material> is not Clone. GlobalAssembler is
constructed with materials.clone(), so every assembler ever built got
an empty database and every analysis failed MaterialNotFound on a
correctly specified mesh. Materials are immutable once registered, so
the map now holds Arc and cloning shares them.
5. displacement_only numbered three displacement components on a 2-D
mesh. Elements supply two, so assembly rejected every contribution.
6. to_dof_numbering pushed each node's DOFs in HashMap iteration order.
When that came out [v, u] the assembler wrote the element's u row into
the global v row. The result was still symmetric, still had the right
rigid-body null space and still summed to the right total mass -- it
simply described a structure with its axes transposed per node, and
get_dof(node, DisplacementX) then pointed at the wrong row so
constraints were applied to the wrong direction too. DofComponent now
carries a canonical_index and the DOFs are sorted by it.
ModalAnalysis is wired to real assembly and the repaired eigensolver, and
takes boundary conditions, which it previously had no way to accept. The
eigensolver now rejects a singular stiffness explicitly: try_inverse does
not fail on a matrix singular only to working precision, so an
unconstrained structure used to return rigid-body noise dressed up as
low-frequency modes.
Validation, 18 tests:
- Element matrices: rigid translation stores no energy, exactly 3
rigid-body modes in 2-D and 6 in 3-D, consistent mass integrates to
rho*V, mass positive definite, and K and M each scale only with the
property they depend on. A zero matrix passes symmetry and
does-not-crash checks, so these are chosen to be ones it fails.
- Modal, end to end: longitudinal modes of a fixed-free bar against
f_n = (2n-1)/(4L) sqrt(E/rho), within 1% on the first three, and
second-order convergence under refinement. Axial rather than
cantilever bending on purpose: Quad4 shear-locks, so a bending
tolerance would fail for a reason unrelated to correctness. Bending
is asserted as convergence from above instead, which is the honest
claim for a locking element.
Two fixtures corrected rather than tolerances loosened: integration_tests
expected 27 DOFs for a 9-node planar mesh (3 components per node), which
encoded defect 5 and contradicted comprehensive_tdd_tests asserting
num_nodes * 2 for the same situation.
rtx-fsi stays 26/26. No new failures; the rtx-cfd quarantine is
unchanged.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
||
|
|
cca29aac8f |
rtx-fea: repair the eigensolver, and stop the suite lying about the rest
CI / Clippy Check (push) Canceled after 0s
CI / Build (macos-latest) (push) Canceled after 0s
CI / Build (ubuntu-latest) (push) Canceled after 0s
CI / Test (macos-latest) (push) Canceled after 0s
CI / Test (ubuntu-latest) (push) Canceled after 0s
CI / Build CPU-Only (Explicit) (push) Canceled after 0s
CI / Python Bindings (maturin) (macos-latest) (push) Canceled after 0s
CI / Python Bindings (maturin) (ubuntu-latest) (push) Canceled after 0s
CI / WASM Build + Size Check (push) Canceled after 0s
CI / Distributed Training Tests (push) Canceled after 0s
CI / CI Success (push) Canceled after 0s
Documentation / Build API Documentation (push) Canceled after 0s
Documentation / Build User Guide (push) Canceled after 0s
Performance Benchmarks / Run Benchmarks (push) Canceled after 0s
CI / Format Check (push) Canceled after 0s
Lifts the 27 `#[ignore]` markers on rtx-cfd and rtx-fea. 21 of them fail;
6 were stale, marking components that have since been implemented. The
suite now reports the truth, which means it is red.
The eigensolver had three independent defects, each individually fatal.
Found by writing closed-form tests first and confirming red:
- The generalized reduction formed M^-1 K and ran Lanczos on it.
M^-1 K has the right eigenvalues but is not symmetric even when K
and M both are, and Lanczos assumes symmetry -- so it returned a
wrong answer rather than an inaccurate one. On a 2-DOF spring-mass
chain with M = diag(2,1) it gave 1.633 against an exact root of
1 - sqrt(2)/2 ~= 0.293. Replaced with the Cholesky reduction
B = L^-1 (K - sigma M) L^-T.
- Output was unsorted. nalgebra's symmetric_eigen gives no ordering
guarantee and none was imposed; modal analysis names modes by index,
so the ordering is part of the contract.
- Eigenvectors could not be transformed back out of the Krylov basis.
The Lanczos block was (n x num_iter) and the tridiagonal
eigenvectors (min(num_iter, k) x k); whenever those differed the
multiply panicked on a dimension mismatch -- that is, on every
problem with more DOFs than requested modes, which is every real
modal analysis.
Lanczos now runs shift-invert by default. Plain Lanczos converges to the
eigenvalues of largest magnitude and modal analysis wants the lowest, so
without it the solver returns the modes nobody asked for. Also switched
to full reorthogonalization, twice per step, so converged eigenvalues do
not reappear as ghosts indistinguishable from genuine repeated roots.
ModalResults computed f = sqrt(lambda / 2pi) instead of
sqrt(lambda) / 2pi. The two agree only at lambda = 2pi, so a smoke test
asserting a positive frequency would never separate them. A
`#[cfg(disabled)]` module in the same file asserted the correct formula
-- the module was disabled rather than the bug fixed. That module is
removed; tests/eigenvalue_closed_form.rs supersedes it with every
expected value derived analytically.
Corrected a fixture rather than loosening its tolerance:
implementation_tests expected the smallest eigenvalue of
tridiag(-1, 4, -1) at order 3 to be 4 - 2 sqrt(2) ~= 1.172. The
eigenvalues of tridiag(c, a, c) are a + 2c cos(k pi / (n+1)), so the
true value is 4 - sqrt(2) ~= 2.586. The test had been quarantined for
failing to match an expectation that was never right.
rtx-fsi is untouched and stays 26/26.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
||
|
|
9be5f4a68f |
rtx-fsi: partitioned fluid-structure coupling
CI / Build CPU-Only (Explicit) (push) Canceled after 0s
CI / Python Bindings (maturin) (macos-latest) (push) Canceled after 0s
CI / Python Bindings (maturin) (ubuntu-latest) (push) Canceled after 0s
CI / WASM Build + Size Check (push) Canceled after 0s
CI / Distributed Training Tests (push) Canceled after 0s
CI / CI Success (push) Canceled after 0s
Documentation / Build API Documentation (push) Canceled after 0s
Documentation / Build User Guide (push) Canceled after 0s
CI / Format Check (push) Canceled after 0s
CI / Clippy Check (push) Canceled after 0s
CI / Build (macos-latest) (push) Canceled after 0s
CI / Build (ubuntu-latest) (push) Canceled after 0s
CI / Test (macos-latest) (push) Canceled after 0s
CI / Test (ubuntu-latest) (push) Canceled after 0s
Performance Benchmarks / Run Benchmarks (push) Canceled after 0s
rtx-cfd (18,715 lines) and rtx-fea (36,576 lines) both exist and nothing connects them -- rtx-fea is commented out of rtx-cfd's dependencies. This is the coupling layer, and it is the piece Prof. Charbel Farhat's 2026 Guggenheim Medal citation is actually about. It depends on NEITHER solver. The properties that make a partitioned coupling correct -- conservation of force, moment and interface work -- are statements about the transfer operators alone, so they can be validated now, on solvers whose canonical-benchmark validation is still outstanding. Adapters to the concrete solvers belong above this. TRANSFER (transfer.rs). Weights satisfy two constraints: sum(w_i) = 1 partition of unity -> force conserved sum(w_i x_i) = x_face linear reproduction -> MOMENT conserved The second is the one that gets skipped. Inverse-distance weighting satisfies the first and generally violates the second, conserving force while corrupting moment -- which shows up as slow spurious rotation rather than as an obvious error. Underdetermined for >4 nodes, so it takes the minimum-norm solution w = A^T (A A^T)^+ b. That is a PSEUDO-inverse, and not for defensiveness. A wetted surface is a surface, so its nodes are usually planar, and for a planar patch the z constraint row is an affine multiple of the ones row -- A A^T is genuinely rank-deficient. The constraint is redundant there, not unsatisfiable. An ordinary inverse rejects the most ordinary interface there is; I found this because my first test fixture was collinear and the code correctly refused it. Constraints are then verified against the weights actually obtained, since a pseudo-inverse returns a least-squares answer whether or not the system was consistent. Motion transfer uses the TRANSPOSE of the load operator, which makes interface work conserved identically: (Hf).v = f.(H^T v). Any other pairing leaks energy every step, and the leak looks like physics until it destabilises. COUPLING (coupling.rs). Staggered and Aitken-relaxed subiteration. The decisive tests reproduce the added-mass effect: at a gain of 2.5 the fixed-relaxation scheme DIVERGES and is reported as CouplingDiverged rather than as an exhausted budget, and Aitken recovers the same case. A partitioned coupling that cannot reproduce its own classic failure mode is not being tested hard enough. Aitken is exact for a linear fixed point, so convergence is asserted at <=4 iterations -- pinning that this is the real delta-squared formula and not an under-relaxation that happens to work. SCOPE, stated up front in the crate docs: small-displacement transpiration coupling on a fixed mesh. Deliberately not ALE and not embedded-boundary, so the Discrete Geometric Conservation Law does not yet apply -- the mesh does not move. Large motion needs an embedded boundary treatment; that is the next phase, not an oversight. External comparator named at entry: Turek-Hron FSI2/FSI3, not yet reached. 26 tests written red-first; cargo test/fmt/clippy -D warnings clean. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> |
||
|
|
4aaa36a57a |
style: cargo fmt --workspace (whitespace/wrapping only, no semantic change)
Whole-workspace rustfmt pass picked up while iterating on Mamba GPU backward work. Verified formatting-only via diff sampling; no logic changed. Co-Authored-By: Claude Sonnet 5 <[email protected]> |
||
|
|
b861b3bb2e |
fix(rtx-science): drop unused ndarray-linalg dep
CI / Format Check (push) Failing after 14s
CI / Clippy Check (push) Failing after 1m8s
Documentation / Build User Guide (push) Successful in 14s
Documentation / Build API Documentation (push) Failing after 1m15s
CI / Build (ubuntu-latest) (push) Failing after 1m31s
Performance Benchmarks / Run Benchmarks (push) Successful in 2m0s
CI / Build (macos-latest) (push) Failing after 7m14s
CI / Test (macos-latest) (push) Has been skipped
CI / Test (ubuntu-latest) (push) Has been skipped
CI / Python Bindings (maturin) (macos-latest) (push) Has been skipped
CI / Python Bindings (maturin) (ubuntu-latest) (push) Has been skipped
CI / WASM Build + Size Check (push) Has been skipped
CI / Distributed Training Tests (push) Has been skipped
CI / Build CPU-Only (Explicit) (push) Failing after 8m46s
CI / CI Success (push) Failing after 0s
Declared but never referenced; forced openblas-build (no good Apple-Silicon backend) and broke the macOS build. Co-Authored-By: Claude Opus 4.8 <[email protected]> |
||
|
|
448c0a0be5 |
fix(gaps): G1 — re-enable Python bindings (PyO3 0.25, Python 3.14)
- Upgrade workspace pyo3 0.24 → 0.25 and numpy 0.24 → 0.25 for Python 3.14 support - rtx-sklearn-py: replace pinned pyo3 0.20 / pyo3-asyncio 0.20 / numpy 0.20 with workspace versions; remove broken pyo3-asyncio async feature; update pyo3-build-config to 0.24 - rtx-bindings: uncomment pyo3/numpy/ndarray optional deps; enable python feature in Cargo.toml - Migrate rtx-bindings python/ to PyO3 0.25 Bound API: &PyAny → Bound<'py, PyAny>, downcast/extract on Bound types, remove rtx_runtime import, remove InferenceError arm (variant not in enum), fix py_shape_to_shape signature - Migrate rtx-sklearn-py src/ to PyO3 0.25 Bound API: #[pymodule] fn now takes &Bound<'_, PyModule>, &PyDict → &Bound<'py, PyDict>, from_array returns Bound (unbind instead of to_owned), PyTuple::new now fallible, use numpy::ndarray (0.16) over workspace ndarray (0.15) to resolve trait mismatches Co-Authored-By: Claude Sonnet 4.6 <[email protected]> |
||
|
|
16161bb9df |
deps: align all 56 per-crate Cargo.toml files to thiserror v2
The workspace root was upgraded to thiserror = "2" in an earlier commit, but 56 per-crate Cargo.toml files still independently declared "1.0". These crates do not use workspace.dependencies inheritance for thiserror. All updated to thiserror = "2" for complete fleet alignment. Includes: rtx-backend, rtx-tensor, rtx-losses, rtx-backend-cuda/rocm/metal, all training crates (rtx-auto, rtx-rl, rtx-distributed, rtx-federated, etc.), specialized crates (rtx-science, rtx-platform, rtx-nmf, rtx-neuro-*), production crates (rtx-streaming, rtx-serving-api), and all demo crates. cargo check --workspace: PASSES. |
||
|
|
a88d254518 | rust-scan: edition 2024 clippy clean, workspace lint fixes 2026-04-25 | ||
|
|
02d382d5f6 |
style: apply rustfmt across all crates and demos
Consistent formatting pass: line wrapping, import sorting, trailing whitespace removal, let-chain indentation, merged derive attributes, and unsafe block reformatting. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> |
||
|
|
4d88dc0584 | Initial commit |