Skip to main content

newton_system_fixed

Function newton_system_fixed 

Source
pub fn newton_system_fixed<const N: usize, F>(
    f: F,
    start: [f64; N],
    criteria: Criteria,
) -> OgeomResult<([f64; N], f64, Convergence, usize)>
where F: FnMut(&[f64; N]) -> ([f64; N], [[f64; N]; N]),
Expand description

A fixed-size newton_system for N unknowns, allocation-free.

The same damped iteration (halving until the residual falls, the same three verdicts), on stack arrays and a fixed-size LU: the intersectors’ three- and four-unknown systems run this millions of times per model, and the general path allocates for every residual, Jacobian and step.

§Errors

OgeomError::Numeric if the Jacobian is singular.