pub struct TSymLinearSolver { /* private fields */ }Expand description
Driver wrapping a SparseSymLinearSolverInterface (and optionally
a TSymScalingMethod).
Implementations§
Source§impl TSymLinearSolver
impl TSymLinearSolver
Sourcepub fn new(
backend: Box<dyn SparseSymLinearSolverInterface>,
scaling_method: Option<Box<dyn TSymScalingMethod>>,
linear_scaling_on_demand: bool,
) -> Self
pub fn new( backend: Box<dyn SparseSymLinearSolverInterface>, scaling_method: Option<Box<dyn TSymScalingMethod>>, linear_scaling_on_demand: bool, ) -> Self
Build a driver around backend. Pass Some(scaling) to enable
symmetric scaling. linear_scaling_on_demand=true matches
upstream’s default and keeps scaling off until
Self::increase_quality turns it on.
Sourcepub fn initialize_structure(
&mut self,
dim: Index,
airn: &[Index],
ajcn: &[Index],
) -> ESymSolverStatus
pub fn initialize_structure( &mut self, dim: Index, airn: &[Index], ajcn: &[Index], ) -> ESymSolverStatus
Pin the triplet sparsity pattern. Must be called once before
the first Self::multi_solve. airn / ajcn are 1-based.
Mirrors the bulk of TSymLinearSolver::InitializeStructure.
Sourcepub fn multi_solve(
&mut self,
vals: &[Number],
new_matrix: bool,
nrhs: Index,
rhs_vals: &mut [Number],
check_neg_evals: bool,
number_of_neg_evals: Index,
) -> ESymSolverStatus
pub fn multi_solve( &mut self, vals: &[Number], new_matrix: bool, nrhs: Index, rhs_vals: &mut [Number], check_neg_evals: bool, number_of_neg_evals: Index, ) -> ESymSolverStatus
Solve A x = b (or multiple RHS).
vals is the new triplet-format value array (length
nonzeros_triplet). new_matrix=true requests a refactor
(and a fresh scaling-factor computation if scaling is on);
new_matrix=false reuses the existing factor and just runs
back-substitution.
rhs_vals packs nrhs columns, each length dim, in
column-major layout. Solutions overwrite rhs_vals.
Trait Implementations§
Source§impl Debug for TSymLinearSolver
impl Debug for TSymLinearSolver
Source§impl SymLinearSolver for TSymLinearSolver
impl SymLinearSolver for TSymLinearSolver
Source§fn increase_quality(&mut self) -> bool
fn increase_quality(&mut self) -> bool
Mirrors upstream’s IncreaseQuality: switching scaling on at
the wrapper level (linear_scaling_on_demand=true path) takes
precedence over asking the backend for tighter pivoting.