9.6 KiB
Stellar-equilibrium preconditioning campaign — 2026-09-03
Scope
This campaign established and tested a compile-time composable right-preconditioner for the current bordered stellar-equilibrium Jacobian. The reference problem is the zero-rotation, n = 3 polytrope with an isobaric surface, fixed total mass, and fixed central density, discretized on sandbox.smesh and linearized at the projected Lane–Emden seed.
The complete operator remains matrix-free. Sparse or dense matrices are assembled only for individual surrogate blocks.
Recommended policy before the nonlinear-solver phase
The best-supported complete-system policy retains:
- an uncalibrated surface Riesz diagonal;
- surface-then-material triangular factorization;
- independent material/surface and gravity subsystems;
- gravity approximate LDU;
- an exact dense Schur correction for the small specification border.
The automatic gravity policy now uses an order-5 fixed matrix-free Chebyshev inverse for the mapped H(div) mass operator and three fixed BoomerAMG cycles for the potential Schur surrogate. The low-level composition API can still select order 4 for a slightly cheaper application, diagonal mass inversion, and any valid fixed-cycle configuration.
Surface scalar calibration, the surface H1 mass-plus-stiffness surrogate, material approximate LDU, and cross-subsystem stellar factorizations remain explicit opt-in experiments. None has earned promotion to the default.
What the measurements showed
Material–surface subsystem
The uncalibrated surface-then-material factorization reached a true relative residual of approximately 6.42e-6 in 40 iterations on the manufactured subsystem problem. Operator-action scalar calibration improved that isolated residual to approximately 1.38e-6, and material LDU with the same calibration reached approximately 1.11e-6.
That isolated improvement did not transfer to the complete operator. The surface Jacobian spans roughly three orders of magnitude across tested surface modes, so a single scalar cannot be a uniformly accurate inverse. A right-preconditioned-action fit was added because it optimizes the operation actually used by J M^-1; it reduced the isolated balanced recovery defect from approximately 1.010 to 0.848 and was stable from one to sixteen probes. It is retained as an experiment, not a default.
The H1 mass-plus-stiffness surface surrogate also remains experimental. Its fit residual and extreme gains showed that this two-term local differential model does not reliably represent the restricted surface Jacobian on the current discretization.
Gravity subsystem
With a diagonal H(div) mass inverse and one fixed BoomerAMG cycle, gravity approximate LDU was decisively better than block-diagonal or one-sided triangular factorizations. It reached 1.59e-8 after 100 iterations, versus approximately 1e-6 for the triangular policies and 2.84e-3 for block diagonal.
The new backend sweep separated two approximation errors:
- the mapped H(div) mass inverse;
- the scalar potential-Schur inverse supplied by fixed-cycle BoomerAMG.
Two AMG cycles reduced the measured Schur recovery defect from 0.169 to 0.083 and made the diagonal-mass gravity solve converge in 87 iterations. A fixed matrix-free Chebyshev polynomial applied to the exact partially assembled H(div) mass operator improved the coupled gravity iteration count much more strongly. Representative converged results were:
| H(div) mass inverse | AMG cycles | iterations | solve time (s) | true relative residual |
|---|---|---|---|---|
| diagonal | 2 | 87 | 5.43 | 8.51e-9 |
| Chebyshev order 3 | 2 | 47 | 5.82 | 8.27e-9 |
| Chebyshev order 4 | 2 | 44 | 6.80 | 8.49e-9 |
| Chebyshev order 4 | 3 | 43 | 7.36 | 7.23e-9 |
| Chebyshev order 5 | 3 | 42 | 8.48 | 8.00e-9 |
For the isolated gravity solve, order 3–4 is the useful quality/cost region: order 5 buys only one or two additional iterations at materially higher preconditioner cost. The complete-system comparison below nevertheless shows that order 5 earns its small end-to-end cost there. MFEM 4.9.1 supports Chebyshev orders only in [1, 5]; the backend now validates that range and turns an otherwise fatal MFEM abort into an ordinary configuration error.
Complete bordered stellar operator
On the block-balanced manufactured correction, the original complete default reached a true relative residual of 3.47e-4 in 36 iterations. Identity reached only 0.783. Every previously tested calibrated or more strongly coupled composition was worse (0.0107–0.0413) and substantially more expensive.
Holding every other block and factorization fixed, two AMG cycles alone produced only 3.46e-4. Chebyshev order 3 with two AMG cycles improved this to 2.24e-4; Chebyshev order 4 with three AMG cycles reached 1.43e-4; and the final order-5/AMG-3 challenger reached 1.19e-4. Relative to order 4, order 5 reduced the fixed-budget residual by another 16.7% and the correction error from 2.844 to 2.219, while increasing the matched total solve time only from 181.16 s to 182.00 s. Relative to the diagonal-mass control, it reduced the fixed-budget residual by 65.6%. This evidence supports promoting Chebyshev-5/AMG-3 as the automatic gravity default, while retaining order 4 as the nearby quality/cost option.
For that default result, 93.8% of the final squared residual was in the gravity-gradient equation and 6.2% was in Poisson balance. Material, surface, and specification-border residuals were negligible globally. This motivated the H(div) Chebyshev work rather than further surface tuning.
The short Arnoldi projection is useful as a diagnostic, but not as a policy oracle. In the complete system the identity operator had a much smaller 12-vector projected condition proxy than the successful default even though its FGMRES result was dramatically worse. True residual reduction and Jacobian applications therefore remain the primary decision metrics.
Physical Newton right-hand side
The physical experiment solves J delta = -R(u) at the same projected Lane–Emden state and evaluates seven damped nonlinear trial states for every correction. All trial states in the first comparison were finite, nonnegative in density, and orientation preserving.
The physical right-hand side exposed a solver-level issue that the manufactured problem does not: all candidates stagnated at the 20-vector restart. The current default reduced the true linear residual only to 0.999800 in 48 iterations; uncalibrated material-then-gravity reached 0.999092 but cost more than three times as much per solve. The right-hand side is dominated by barotropic closure (3.51e-5), while its gravity rows are around 1e-11; the unscaled Euclidean Krylov norm and restart therefore do not provide a physically balanced convergence measure. This is evidence for explicit equation scaling and restart studies in the solver phase, not evidence that the complete preconditioner should adopt the expensive cross factorization.
Correctness and lifecycle guarantees added
- Fixed and adaptive backend application modes remain distinct; only stationary-linear configurations are Arnoldi admissible.
- The matrix-free Chebyshev backend owns its diagonal and essential-DOF list, uses a deterministic power estimate, is fixed-order linear, and reconstructs itself on geometry refresh.
- Chebyshev configuration validates polynomial order, power-iteration count, a strictly positive random seed, a power-method tolerance in
(0, 1), size, and strict positivity of the assembled mass diagonal. - Gravity composition is generic over a compile-time compatible mass backend, so the new backend propagates through the stellar-structure and specification-border layers without a runtime type registry.
- Prepared composite blocks explicitly prohibit unsafe copying and moving when their factorization stores pointers into their own members.
- Unit tests cover backend compatibility, linearity, positivity, statistics, invalid configuration, and composite ownership. Integration tests cover geometry staleness and explicit refresh without repreparing the physical geometry.
- The focused gravity integration suite passes with both one and two MPI ranks. It applies the Chebyshev-backed block after an ordinary geometry refresh, then forces a discretization revision that reconstructs the underlying matrix-free operator, verifies that stale application and stale inverse access are rejected, refreshes the owner, and verifies finite repeatable post-rebind actions. Full numerical quality comparisons in this campaign remain single-rank.
Reproducible artifacts
preconditioning_p9_surface_calibration_objectives.csvpreconditioning_p10_full_stellar.csvpreconditioning_p10_physical_newton.csvpreconditioning_p4_gravity_chebyshev_sweep_v2.csvpreconditioning_p10_gravity_backend_finalists.csvpreconditioning_p10_gravity_backend_finalists_v2.csv
The experiment sources are experiments/material_surface_preconditioning.cpp, experiments/gravity_preconditioning.cpp, and experiments/full_stellar_preconditioning.cpp.
Remaining work
- In the solver phase, introduce physically meaningful equation/value scaling and compare restarted with unrestarted or larger-restart FGMRES on the physical Newton right-hand side.
- Validate the selected policy across mesh refinement, nonzero rotation, deformed geometry, and more than one MPI rank.
- Revisit surface preconditioning only with a richer surrogate or multilevel representation; do not promote a scalar or H1 fit solely from isolated measurements.
- Treat adaptive inner solves as FGMRES-only and exclude them from fixed-operator Arnoldi studies.