Skip to main content
← OpenMECP Documentation

update_hessian_bfgs

Function update_hessian_bfgs 

Source
pub fn update_hessian_bfgs(
    hessian: &DMatrix<f64>,
    delta_x: &DVector<f64>,
    delta_g: &DVector<f64>,
) -> DMatrix<f64>
Expand description

BFGS Hessian update for minima (MthUpd=3).

Implements the standard BFGS formula from Old Code D2CorX:

H_new = H + (Δg·Δg^T)/(Δx·Δg) - (H·Δx·Δx^T·H)/(Δx^T·H·Δx)

§Curvature Condition

The update is only applied if Δx·Δg > 0 (positive curvature). This ensures the updated Hessian remains positive definite for minima.