forked from 1b-agent/fieldcraft-upstream
solver: symmetric indefinite LDLᵀ factorization with inertia
A supernodal LDLᵀ on the Cholesky factor's symbolic factorization (ordering, supernodes, fill, cap and parallel subtree tasks shared through a Symbolic and a generic driver; the Cholesky numerics are unchanged bit for bit). Pivots by the bounded Bunch–Kaufman (rook) search of Ashcraft, Grimes & Lewis among each supernode's columns (Schenk & Gärtner's supernode Bunch–Kaufman), 1 × 1 and 2 × 2, right-looking panels whose trailing update reuses the tiled Cholesky kernels with L D formed on the fly. Reports the inertia; a column without a pivot above round-off is a located Singular error; NaN is refused. Symmetric::new picks Cholesky, LDLᵀ, or Cholesky with an LDLᵀ fallback; solve_refined adds iterative refinement. 1.1–1.2× the Cholesky time on a 140 000-equation hex8 pattern. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm
This commit is contained in:
1 parent
11a69d8171
commit
908dae180b
7 files changed
+1176
-75
No files matched your search
@@ -310,7 +310,7 @@ fn factor(a: &Csr, limits: &Limits, mesh: &HeatMesh, eqs: &Equations) -> Result<
|
||||
}
|
||||
FactorError::OutOfMemory { entries } => Error::Limit(format!("not enough memory for the factorization ({entries} entries)")),
|
||||
FactorError::Internal(what) => Error::Internal(what),
|
||||
FactorError::NotPositiveDefinite { column } => {
|
||||
FactorError::NotPositiveDefinite { column } | FactorError::Singular { column } => {
|
||||
let label = eqs.node.get(column).and_then(|n| mesh.labels.get(*n)).copied().unwrap_or(0);
|
||||
Error::Singular(format!(
|
||||
"the temperature is undetermined at node {label}: no temperature boundary condition or convection reaches its part of the model"
|
||||
|
||||
Reference in new issue
Block a user