pub struct AptpNumeric { /* private fields */ }Expand description
Complete multifrontal numeric factorization result.
Contains per-supernode factors and aggregate statistics. Created by
AptpNumeric::factor and used by the triangular solve to
perform forward/backward substitution.
§Usage
use faer::sparse::{SparseColMat, Triplet};
use faer::sparse::linalg::cholesky::SymmetricOrdering;
use rivrs_sparse::symmetric::{AptpSymbolic, AptpOptions, AptpNumeric};
// Analyze
let symbolic = AptpSymbolic::analyze(matrix.symbolic(), SymmetricOrdering::Amd).unwrap();
// Factor
let numeric = AptpNumeric::factor(&symbolic, &matrix, &AptpOptions::default(), None).unwrap();
println!("Stats: {:?}", numeric.stats());Implementations§
Source§impl AptpNumeric
impl AptpNumeric
Sourcepub fn front_factors(&self) -> &[FrontFactors]
pub fn front_factors(&self) -> &[FrontFactors]
Per-supernode factors, indexed by supernode ID.
Sourcepub fn stats(&self) -> &FactorizationStats
pub fn stats(&self) -> &FactorizationStats
Aggregate factorization statistics.
Sourcepub fn per_supernode_stats(&self) -> &[PerSupernodeStats]
pub fn per_supernode_stats(&self) -> &[PerSupernodeStats]
Per-supernode diagnostic statistics.
One entry per supernode in postorder, matching front_factors.
Sourcepub fn factor(
symbolic: &AptpSymbolic,
matrix: &SparseColMat<usize, f64>,
options: &AptpOptions,
scaling: Option<&[f64]>,
) -> Result<Self, SparseError>
pub fn factor( symbolic: &AptpSymbolic, matrix: &SparseColMat<usize, f64>, options: &AptpOptions, scaling: Option<&[f64]>, ) -> Result<Self, SparseError>
Factor a sparse symmetric matrix using the multifrontal method with APTP.
Traverses the assembly tree in postorder, assembling and factoring dense frontal matrices at each supernode using the dense APTP kernel.
§Arguments
symbolic: Symbolic analysis result fromAptpSymbolic::analyzematrix: Sparse symmetric matrix (lower triangle stored). Dimensions must matchsymbolic.nrows()options: APTP configuration (threshold, fallback strategy)
§Errors
SparseError::DimensionMismatchif matrix dimensions don’t match symbolicSparseError::AnalysisFailureif symbolic analysis is inconsistent
§Zero Pivots
If a root supernode has columns that cannot be eliminated (all pivots
delayed to root but still fail the threshold), these are recorded as
zero pivots in FactorizationStats::zero_pivots rather than returning
an error. The factorization succeeds;
the solve phase must handle the rank deficiency.
§References
- Duff & Reid (1983), “The multifrontal solution of indefinite sparse symmetric linear equations”
- Liu (1992), “The Multifrontal Method for Sparse Matrix Solution”
- Hogg, Duff & Lopez (2020), “A New Sparse LDL^T Solver Using A Posteriori Threshold Pivoting”
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AptpNumeric
impl RefUnwindSafe for AptpNumeric
impl Send for AptpNumeric
impl Sync for AptpNumeric
impl Unpin for AptpNumeric
impl UnsafeUnpin for AptpNumeric
impl UnwindSafe for AptpNumeric
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more