Skip to content

MatrixFreeSolver: linear_indefinite; S5 benchmark cases - #52

Merged
jmartfrut merged 5 commits into
mainfrom
s5-bench
Nov 10, 2026
Merged

jmartfrut merged 5 commits into
mainfrom
s5-bench

Conversation

@jmartfrut

Copy link
Copy Markdown
Member

Matrix-free side of S5 (HyperFEM branch s5-levers): the linear solver says when it stopped because the tangent is
indefinite, so that HyperFEM's HybridTangent switches to the projected tangent instead of the driver bisecting.

Branch s5-bench on main 000848d, 5 commits (afbf944, 85d4615, 8a77f3f, 9dd4eee, e31b389). Measurements in
design/solvers-s5-status.md.

What changes

  • src/solvers.jl: linear_indefinite(ns::MatrixFreeSolverNS). CG runs with Krylov.jl's linesearch = true: a
    non-positive curvature pᵀAp ≤ 0 stops it with the last positive-curvature iterate and the solve is reported as failed
    and indefinite instead of diverging. preconditioner_indefinite(P) (default false).
  • src/pmultigrid.jl, src/smoothers.jl: an indefinite level of the p-multigrid (finite nodal blocks, a non-positive
    Ritz value: smoother_indefinite) is reported through preconditioner_indefinite; a non-finite one is not.
  • Benchmark: hem_plate_c n k [φtop] (electrode voltage), hem_plate_ch (the coupled model in
    HessianRegularization with a TangentSwitch: the hybrid Newton), krylov.jl words grow=, easy=, atolp=,
    verbose=, maxit=, HFK_SAVE_X (the converged state, to compare with LU), run_s4b.sh modes emphi, emh; hmre r rv [Bfactor] and hmre_h (the
    mechanical model in HessianRegularization).

Tests

test/solvers/test_pmultigrid.jl: elasticity − s·mass with the p-multigrid → failed and linear_indefinite; bare CG on
the same operator → failed, indefinite, finite iterate; an SPD operator → converged, not indefinite; a NaN state → failed,
not indefinite. Solver tests 658 passed.

Results

See the HyperFEM PR: the EM plate past the pull-in at 71k dofs reaches Λ = 1 with the hybrid Newton and the field-split
h-multigrid in 22 s (LU 331–683 s), the states agreeing to 4.5e-7; at 555k dofs in 182 s.

…nite p-multigrid level); S5 benchmark cases

CG runs with Krylov.jl's linesearch = true: a non-positive curvature stops it with the last
positive-curvature iterate and the solve is reported as failed and indefinite instead of
diverging; an indefinite p-multigrid level (finite blocks, a non-positive Ritz value:
smoother_indefinite, preconditioner_indefinite) is reported the same way, a non-finite one
is not. HyperFEM's HybridTangent switches to the projected tangent on this signal.

Benchmark: hem_plate_c n k [φtop] (electrode voltage), hem_plate_ch (the mechanical part in
HessianRegularization with a TangentSwitch: the hybrid Newton, atolp= its projected tolerance),
grow=/easy= (LoadStepping), run_s4b.sh emphi/emh modes.
…son of the hybrid Newton with the direct solver)
@jmartfrut
jmartfrut merged commit 2fad282 into main Nov 10, 2026
10 checks passed
@jmartfrut
jmartfrut deleted the s5-bench branch November 11, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant