Files
rustytorch/crates/specialized/rtx-fea/src/mor/mod.rs
T
Omar SobhandClaude Fable 5 0b4f306ed1
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
rtx-fea: reduced Newmark (mor::dynamic) + the phase-4a offline replay — the ≥10x gate is REFUTED by measurement at the validated resolution
The dynamic layer over ReducedNonlinearModel: reduced consistent mass
V'MV (full element sum, never ECSW-sampled — ECSW weights are trained
on internal-force virtual work and would conserve the wrong inertia),
reduced_force_and_jacobian exposed (solve() refactored onto it), and
ReducedNewmark mirroring NonlinearDynamicStepper::newmark_newton in
reduced coordinates (same predictor, residual, tangent shape; no
rescue ladder by design — a reduced Newton death is a finding).

TDD (tests/reduced_newmark.rs): identity-basis march reproduces the
full stepper to 2.4e-14 over 15 steps (both Newton loops tightened to
1e-10 so only solver rounding separates them); rigid-translation
reduced mass = rho*A to 1e-9; a 6-mode POD basis tracks its training
trajectory at 4.2e-4 rms against a 1.0e-4 projection floor.

Phase 4a (fsi3_ecsw_offline.rs, fsi3_reduced_newmark_replay,
env-gated): reduced Newmark replay of the harvested FSI3 trajectory at
record cadence (dt_rec = 5x march dt), driven by the recorded
end-of-step loads. Measured, m=12/20:

- COST (dt-independent, the verdict): 3,068/3,580 us/step at 4.6/5.0
  Newton iters — 2.0-2.3x the banded full-order structural step
  (7,200 us/pass, bandedlu_fsi3_ny62_t85). The >=10x gate needs
  <=720 us/step; one reduced eval alone costs ~640 us because phase 2
  refuted hyperreduction (every eval loops all 70 elements). The gate
  arithmetic is closed: reduced Newton needs >=2 evals, capping the
  ROM at ~5x. THE CAMPAIGN GATE (pinned cycle bands at >=10x
  structural speedup) CANNOT BE MET at the validated resolution.
- TRACKING at record cadence diverges in the release transient (dies
  t=4.35-4.45) — and the RTX_REPLAY_IDENTITY control dies EARLIER
  (t=4.13) in the exact subspace: the death is the 5x-coarse
  integration + aliased loads, NOT the reduction. The record-cadence
  replay cannot judge subspace dynamics; the projection floor
  (1.1e-3 at m=12) remains the honest subspace statement.

Campaign verdict to be recorded in omni-cortex in the pre-registered
words.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01X2GmJXeQ2njUecEKiJZ1G2
2026-08-30 07:07:49 -05:00

35 lines
1.5 KiB
Rust
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//! Model-order reduction: POD-Galerkin projection with ECSW hyper-reduction.
//!
//! The pipeline, all offline steps verified by their own invariants:
//!
//! 1. Collect full-order solution snapshots (the caller's job — typically a
//! parameter or load sweep of [`crate::analysis::NonlinearStaticAnalysis`]).
//! 2. [`pod::pod_basis`] — orthonormal basis by SVD, truncated at an energy
//! criterion.
//! 3. [`ecsw::train_ecsw`] — nonnegative element weights so that a small
//! element subset reproduces the reduced internal force over the
//! training set ([`nnls`] with an early stop; sparsity comes from the
//! stopping tolerance).
//! 4. [`reduced::ReducedNonlinearModel`] — Newton in reduced coordinates,
//! assembling only the sampled elements.
//!
//! Scope: homogeneous Dirichlet data; the basis is over the free DOFs
//! only (lifting for inhomogeneous boundary values is not implemented).
//! Kinematics are selected per [`reduced::Formulation`]: the original
//! small-strain scope (geometrically linear, materially nonlinear), or
//! total-Lagrangian Saint VenantKirchhoff matching
//! `NonlinearDynamicAnalysis::with_total_lagrangian` — required when the
//! snapshots come from a total-Lagrangian trajectory (the FSI flag).
pub mod dynamic;
pub mod ecsw;
pub mod nnls;
pub mod pod;
pub mod reduced;
pub use dynamic::{ReducedNewmark, ReducedState};
pub use ecsw::{EcswModel, ecsw_residual, train_ecsw, train_ecsw_formulated};
pub use nnls::nnls;
pub use pod::pod_basis;
pub use reduced::{Formulation, ReducedNonlinearModel};