RustBCA
RustBCA copied to clipboard
Need test coverage of all functions
An essential step here would be to separate large, currently integrated functions into testable units - examples being the different forms of electronic stopping, or the different pieces thereof (mean ionization energy, etc.)
Added integrated test for momentum conservation during binary collision. Setting this up caught a bug in the MAGIC implementation of the ZBL potential - the screening length used was incorrect, leading to the generation of NaNs. It also highlighted the need to separate a handful of lines of code in main.rs out into functions - the most obvious example being updating the recoil energy - but, the momentum conservation test works, for all energies and physics options tested, momentum is conserved to within an epsilon of 1E-12.
Test coverage now includes rootfinder (both Newton and CPR (if built with --features cpr_rootfinder)). I need to write a polynomial rootfinder test.
Additionally, tests have been added for all the forms of the scattering integral - Gauss-Mehler, Gauss-Legendre, Mendenhall-Weller, and MAGIC.
Mesh0D and Mesh2D are adequately tested, but units tests need to be written for Mesh1D.
Added tests for the new planar surface binding potential and for the Sphere geometry.