evanoconnor / NuLib

open-source neutrino interaction library
23 stars 16 forks source link

Bug fix to class_ratelibrary::return_weakrate_dynamic #13

Closed csullivan closed 8 years ago

csullivan commented 8 years ago

class_ratelibrary::return_weakrate_dynamic_search was returning inconsistent rates (log10 in the case of table rates and linear in the approximate case). Updated to ensure the units are consistently returned as 1/sec. See the ratelibrary.F90 difference below.

evanoconnor commented 8 years ago

Am I right in saying that this, by default, doesn't effect anything because the dynamic routine is never called?

csullivan commented 8 years ago

Correct. The dynamic routine has an overhead of checking which table (if any) the rate is in, and since this is done already in weakrates_interface::microphysical_electron_capture, the dynamic routine isn't used.

Also, I just noticed that only the top commit (65466d5) is needed in this pull request, so you can merge only it with git cherry-pick if you prefer not to bring in the others.