Expand description
Acceleration methods for iterative algorithms
This module provides various acceleration techniques to improve the convergence of fixed-point iterations, nonlinear solvers, and other iterative methods. These methods are particularly useful for implicit ODE/DAE solvers and iterative linear/nonlinear equation solvers.
§Anderson Acceleration
Anderson acceleration (also known as Anderson mixing) is a technique for accelerating fixed-point iterations x_{k+1} = G(x_k) by using information from previous iterates to extrapolate to better solutions.
§Examples
use scirs2_integrate::acceleration::{AndersonAccelerator, AcceleratorOptions};
use scirs2_core::ndarray::Array1;
// Create accelerator for 3D problem with memory depth 5
let mut accelerator = AndersonAccelerator::new(3, AcceleratorOptions::default());
// In your iteration loop:
let x_current = Array1::from_vec(vec![1.0, 2.0, 3.0]);
let g_x = Array1::from_vec(vec![1.1, 1.9, 3.1]); // G(x_current)
// Get accelerated update
if let Some(x_accelerated) = accelerator.accelerate(x_current.view(), g_x.view()) {
// Use x_accelerated for next iteration
}Structs§
- Accelerator
Options - Options for acceleration methods
- Aitken
Accelerator - Simplified Aitken acceleration for scalar sequences
- Anderson
Accelerator - Anderson accelerator for fixed-point iterations