[12gevmoller_sim] [JeffersonLab/remoll] f2ae31: Check whether field is in bounding box before gett...

Wouter Deconinck noreply at github.com
Wed Apr 3 15:18:55 EDT 2019


  Branch: refs/heads/bugfix-issue-252-slow-magnetic-field-lookups
  Home:   https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FJeffersonLab%2Fremoll&data=02%7C01%7C12gevmoller_sim%40jlab.org%7C520e30264f6645923e4108d6b869375c%7Cb4d7ee1f4fb34f0690372b5b522042ab%7C1%7C1%7C636899159370694205&sdata=gWsOR8bwkLU0tPvrMGUmMSQ%2FRkDnyTx%2FlL%2FG2C%2B11Oo%3D&reserved=0
  Commit: f2ae311eedb5b34a8c84a442349db6eeeb239fa9
      https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FJeffersonLab%2Fremoll%2Fcommit%2Ff2ae311eedb5b34a8c84a442349db6eeeb239fa9&data=02%7C01%7C12gevmoller_sim%40jlab.org%7C520e30264f6645923e4108d6b869375c%7Cb4d7ee1f4fb34f0690372b5b522042ab%7C1%7C1%7C636899159370694205&sdata=SnWAwZUKqbqSONSBQsJJH9qbegZEGRE25k4UonRntB4%3D&reserved=0
  Author: Wouter Deconinck <wdconinc at gmail.com>
  Date:   2019-04-03 (Wed, 03 Apr 2019)

  Changed paths:
    M include/remollMagneticField.hh
    M src/remollMagneticField.cc

  Log Message:
  -----------
  Check whether field is in bounding box before getting field

This avoids a lot of atan2 calls which are expensive.


  Commit: 80b5da366d7c3318b1e0edbea82d86087797974c
      https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FJeffersonLab%2Fremoll%2Fcommit%2F80b5da366d7c3318b1e0edbea82d86087797974c&data=02%7C01%7C12gevmoller_sim%40jlab.org%7C520e30264f6645923e4108d6b869375c%7Cb4d7ee1f4fb34f0690372b5b522042ab%7C1%7C1%7C636899159370694205&sdata=Wcbm0IwiA2CZEVaeIoO%2FG1Q39GR%2BzPbVTA7eBcsJ2Kc%3D&reserved=0
  Author: Wouter Deconinck <wdconinc at gmail.com>
  Date:   2019-04-03 (Wed, 03 Apr 2019)

  Changed paths:
    M include/remollMagneticField.hh
    M src/remollGlobalField.cc
    M src/remollMagneticField.cc

  Log Message:
  -----------
  Reordering of ops in magnetic field, bailout sooner if out of bounds

Since the bounding box doesn't catch every value out of the field region
(it works on cartesian coordinates only), we first check for r, then for
phi. This avoids early atan2 and modf, both of which are expensive.


Compare: https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FJeffersonLab%2Fremoll%2Fcompare%2Ff2ae311eedb5%255E...80b5da366d7c&data=02%7C01%7C12gevmoller_sim%40jlab.org%7C520e30264f6645923e4108d6b869375c%7Cb4d7ee1f4fb34f0690372b5b522042ab%7C1%7C1%7C636899159370704210&sdata=NcrV1wWGQZCYRhab0xVtuHiWPWPZ3j6sAuSnJ47Uu7o%3D&reserved=0


More information about the 12gevmoller_sim mailing list