Skip to content

Multiple changes to speed up the code

Tomas Dado requested to merge tdado/athena:RadiationDMGSpeedUp into master

This MR aims to speed up the radiation damage code. It does multiple things:

  • Moves the check for radiation flag outside of one loop to allow better compiler optimisation
  • Reduces the number of conditions by retrieving the correct maps at the beginning of the loops
  • Uses std::abs, std::sqrt and std::pow consistently in the code
  • Removes debug messages from the innermost loops
  • Pass few objects by const references
  • Replaces comparison of strings to comparison of enums

cc @bnachman

Merge request reports