Skip to main content
← OpenMECP Documentation

compute_adaptive_scale

Function compute_adaptive_scale 

Source
pub fn compute_adaptive_scale(
    energy_current: f64,
    energy_previous: f64,
    gradient_norm: f64,
    step: usize,
) -> f64
Expand description

Computes adaptive step scaling based on optimization progress.

This function adjusts the step size based on energy changes and gradient magnitude to allow natural convergence without fixed multipliers.