pub fn solve_adaptive<O: LinearOperator>(
operator: &O,
b: &Array1<Complex64>,
use_iterative: bool,
) -> Array1<Complex64>Expand description
Solve a linear system using the appropriate method based on system size
For small systems (< 1000 DOFs), uses direct LU factorization. For larger systems, uses iterative CGS with the provided operator.
§Arguments
operator- Linear operator (FMM or dense)b- Right-hand side vectoruse_iterative- Force iterative solver even for small systems
§Returns
Solution vector