Skip to content

Commit 093a857

Browse files
committed
Added more context to error message for NR rootfinder.
1 parent 862981c commit 093a857

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bca.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,8 +698,8 @@ pub fn newton_rootfinder(Za: f64, Zb: f64, Ma: f64, Mb: f64, E0: f64, impact_par
698698
return Ok(x0);
699699
}
700700
}
701-
return Err(anyhow!("Numerical error: exceeded maximum number of Newton-Raphson iterations, {}. E: {}; x0: {}; Error: {}; Tolerance: {}",
702-
max_iterations, E0, x0, err, tolerance));
701+
return Err(anyhow!("Numerical error: exceeded maximum number of Newton-Raphson iterations, {}. E: {} eV; x0: {}; Error: {}; Tolerance: {}; Za: {}; Zb: {}; Ma: {} amu; Mb: {} amu; a: {}; p: {} A",
702+
max_iterations, E0/Q, x0, err, tolerance, Za, Zb, Ma/AMU, Mb/AMU, a, impact_parameter/ANGSTROM));
703703
}
704704

705705
/// Gauss-Mehler quadrature.

0 commit comments

Comments
 (0)