1. 11 Jul, 2019 1 commit
  2. 09 Jul, 2019 1 commit
  3. 07 Jul, 2019 1 commit
  4. 05 Jul, 2019 1 commit
  5. 03 Jul, 2019 3 commits
  6. 02 Jul, 2019 1 commit
  7. 28 Jun, 2019 1 commit
  8. 26 Jun, 2019 2 commits
  9. 21 Jun, 2019 7 commits
  10. 20 Jun, 2019 22 commits
    • John Apostolakis's avatar
      Changed arguments to const Real_v & , ie. references · 9ab4a62f
      John Apostolakis authored
       in ErrorEstimatorSixVec and AuxMethods
    • John Apostolakis's avatar
    • John Apostolakis's avatar
      SimpleIntegrationDriver: Protect debug code; use constants kPowerGrow/Shrink · adfa459c
      John Apostolakis authored
      Count trials only when debugging with CHECK_ONE_LANE
       - addresses MT scaling issue
    • John Apostolakis's avatar
      Drivers: fixed for power to grow / shrink step. Force use of DoPri5. No debug prints. · 20f7d4c9
      John Apostolakis authored
      FieldPropagationFactory: Force use of Rolling driver + Dormand Prince stepper
        - Use Dormand Prince for Scalar driver (instead of Cash-Karp) - GUFieldPropagator
      Improve options in FullCMS. Revised checkes vector vs scalar.
        - disentangle names of optarg flags [GHIJ]
        - revised checks vector vs scalar.
      GUFieldPropagator: Fix construction of Scalar propagators
       - In construction of Scalar propagators - added new parameter Epsilon
      ScalarIntegrationDriver: check value of epsilon in constructor. It must be > 0.1
        - Suppressed printout - commenting out #define options
        - Option to print Statistics at end of call to AccurateAdvance (for now.)
        - Revised call to laneStats -> Use SumAndResetLane
      TrialStats: Fixed method to SumAndReset Lane. Added method to check invariants.
      Created new Scalar Dormand Prince stepper.
       - to ensure consistency between scalar and vector, and ease comparisons with Geant4.
      Removed 'charge' argument from Scalar Stepper's DistChord (virtual) method
       - it was only needed by Cash Karp; replaced by data member fCharge
      Added DoPri to StepperFactory
      Suppressed debug printing
      ScalarIntegrationDriver: Commented out debug prints.
      FieldPropagationHandler: fix print of step size. Suspended checks.
       - Suppressed checks and debug printing.  FieldPropagationHandler (+fix in print)
       - Print stepSize[itr] not *stepSize for all tracks.
       - Refined code for reporting differences when checking
       - Commented out compilation flag CHECK_VS_RK
      BaseRkIntegrationDriver: Use correct powers to grow & shrink step (were reversed.)
        - (Re)Fix 'blend' to use kPowerGrow for 'good' steps (not kPowerShrink)
        - Deleted unused member variable & cosmetics
      CMSFieldConstruction: Revised description in comment about choice of drivers or steppers.
      testVectorIntegrationDriver: Fix for CHECK_ONE_LANE off
      BaseRkIntegrationDriver & SimpleIntegrationDriver:
        - Make kPowerGrow and kPowerShrink compile time constants. (again)
      Renamed sOrderMethod to kOrderMethod in flex/vector and scalar steppers
    • John Apostolakis's avatar
      GUFieldPropagator: Make RollingIntegrationDriver default. · 576cdd13
      John Apostolakis authored
      testScalarIntegrationDriver: Fix call to integration driver
    • John Apostolakis's avatar
      Rolling & Scalar IntegrationDriver: count only 'good' steps towards step number limit · ba267073
      John Apostolakis authored
      RollingIntegrationDriver: count only 'good' steps towards step number limit
       - Co-works with changes in ScalarIntegrationDriver.
      ScalarIntegrationDriver: changed while exit condition re number of iterations
      - Co-works with change in RollingIntegrationDriver that counts 'good' steps only
      - Suppressed old code for very small steps. [ Cleaned up if( true ) & else .]
         That 'branch' was not used in order to be compatible with vector code.
      Agreement shown in test case 3 of testVectorIntegrationDriver
      Small changes in aux classes: BaseRkIntegrationDriver, TrialsStats, FormattedReporter
       - BaseRkIntegrationDriver:  number of components: int -> unsigned & check it
       - FormattedReporter: small refinement in ReportOneLane - use separate ostream, then send to cout
       - TrialStats: Added method PrintSummary.  Fixed names in some printouts.
    • John Apostolakis's avatar
      Changes in 'techical' classes and tests · 22f34966
      John Apostolakis authored
      TrialStats:  Simple extensions.
      Others:      Small changes
      ScalarIntegrationDriver: added message to constructors (prints MaxNoSteps). MaxStepBase=250
      testVectorIntegrationDriver: reset s in yInput; small change in comparison prints.
    • John Apostolakis's avatar
      RollingIntegrationDriver: use number of trial 'steps'. Fixed Store values in break-out · a1c7b671
      John Apostolakis authored
      - Added lane statistics (to ensure each one stays < max number of steps )
      - Fixed Set/Get MaxNoSteps - use BaseRkIntegrationDriver methods  ( suppressed local variable fMaxNoSteps )
      - Print Max No Steps in constructor (to document parameter of run)
      KeepStepping  ( RollingIntegrationDriver )
      - Use number of steps (in lane/track) as condition for ending integration
      - Fix to update hStep/errMax 'LastActive' before updating the value of 'Active'
      - Revised StoreGoodValues in 'break out' to include lanes which either progressed or were active
             (i.e. include active that did not progress.)
        Fixes storing of tracks that were active but nevery progressed (in this call.)
      AccurateAdvance ( of RollingIntegrationDriver )
      - Renamed 'isDoneLane' to 'laneUnemployed' ( = done or not containing work )
      - Revised condition of loop -- uses tracks' number of steps & adds 'shortcut' in case
          all lanes are 'unemployed'
    • John Apostolakis's avatar
      Use current value of momentum^2 for normalisation of error · 1dbedd30
      John Apostolakis authored
      Syncs with RollingIntegrationDriver.  ( Using initial value caused un-syncing.)
    • John Apostolakis's avatar
      RollingIntegrationDriver: Reduce 'early' exit; corrections to stored values · 05c1788c
      John Apostolakis authored
       RollingIntegrationDriver: Experimental changes to reduce 'early' exit when lanes did not receive work
        - Identify lanes without work => var  finishedBeforeStart
            Trial use to detect false 'someDone' signals
        - Code to switch off 'allFinish' mode  ( which is trigerred by var mustFinalAllStill )
            this ignores 'lastBatch' argument
            it is meant only for testing vs older versions.
        - Renamed errmaxSqFallThru to errmaxSqBreakOut (better description)
        - Created 'bool toContinue' for while condition - to store values before exit & for printing
        - investigate why jumping out from KeepStepping and coming back in gives different errors and/or step sizes
      RollingIntegrationDriver: corrections to storing values; revised to divide by current momentum^2
      Error Estimation ( Simple / Rolling / Scalar Integration Driver )
        * Use the current value of momentum-square for normalisation of error,
            not the one from the call to KeepStepping (Rolling ID) or OneGoodStep (Simple ID)
          ( Because that value varied between these two, and also vs Scalar. )
          ==> Alternative: store track's initial value of momentum-square (or better its inverse),
                           e.g. at start of AccurateAdvance, and use during the whole step.
          This improved the agreement between scalar and rolling substantially. ( Simple & scalar
             already agreed for the test cases. )
      RollingIntegrationDriver's  KeepStepping() method:
        Scoring of final values: Corrected ( created 'ver 7.1' )
        - it is (for now) separate for 'break' and fall-through cases
           * identify fall-through case
        - no longer use 'BreakOut' values for fall-through case (error)
        - store and use 'last active' values for 'hStep' and 'errmax_sq' - during loop
      ScalarIntegrationDriver: changed base for max number of steps from 250 to 2500, for better comparisons. (to change BACK?)
    • John Apostolakis's avatar
      RollingIntegrationDriver: corrected/changed storing of values in KeepStepping... · a2720197
      John Apostolakis authored
      RollingIntegrationDriver: corrected/changed storing of values in KeepStepping - 2 options under study
      a) Must store new values for y only if some (sub)step succeeded.  => use 'progressedLane' to keep track
      b) Seek to store last good step's values of 'hStep' and errmaxSq ('try 5')
      c) Store value last good value of errmaxSq
      d) New argument 'lastBatch' for KeepStepping and 'mode'/flag to ensure it finishes the work (or gets to maxIter?)
      Many new prints to check new conditions.
      Use new method ComputeStepLengthWithinLimits3 - it uses 'PowerIf' and returns stretchFactor.
      Open issues:
       1) KeepStepping: Ensure that values 'stored' are the most useful, and contain information to avoid step duplication.
          Q: Does it require additional state about last bad values ... ??   Or just expect to use hNext from StepStart ?
       2) Pass work to serial version when only one lane is working.
      Other / unrelated:
      - testVectorIntegrationDriver: revised default run parameters and changed print for number of calls.
      - SimpleIntegrationDriverWithMaxPrints: Change to use PowerSameIf..
    • John Apostolakis's avatar
      AuxVecMethods: Split PowerIf to methods for same or different exponents. · 67ea8774
      John Apostolakis authored
       with obvious names (PowerXXXXIf) - i.e. PowerSameIf and PowerDiffIf
      SimpleIntegrationDriver: Change to use PowerSameIf.  Revised printing (eg print iters).
      OldIntegrationDriver: Change to use PowerSameIf..
    • John Apostolakis's avatar
      Fix and improvement of error estimation. · 5d14d1ec
      John Apostolakis authored
      FieldPropagatorFactory: comment out some steppers to speed compilation.
      ErrorEstimatorSixVec: Fix to return values of errors in EstimateError with 7 args.
       - SimpleIntegrationDriver: changed prints for comparisons.
       - FormattedReporter: make Charge more visible in prints
      BaseRkIntegrationDriver.h: New method ComputeStepLengthWithinLimits3
       --> It uses PowerIf and returns stretchFactor.
    • John Apostolakis's avatar
      Fixed power to compute fErrCon in all drivers. Fix/improved 'report' of 1 lane (for checks.) · b689a95d
      John Apostolakis authored
      - Fixed power used to compute fErrCon to 1/PowerGrow in Simple/BaseRk/Rolling IntegrationDriver
      RollingIntegrationDriver> Change end condition in KeepStepping -- temporary for checks
        End only when allDone (not when one is done - old/trial condition)
      - SimpleIntegrationDriver: Renamed h -> hTry in AccurateAdvanced.
      - Revised verbosity.
      - SimpleIntegrationDriverWithMaxPrints: small cleanup.
      Fix/improved 'report' of 1 lane (for checks.)
       - Fixes a) set x for last step; b) hStep to stop going past end.
       - Additional cleanup, and small printing changes.
       - Added 'x' to ReportOneLane in FormattedReporter and drivers.
       - New method FullReport.
    • John Apostolakis's avatar
      Fixed power grow/shrink (was swapped) in... · 58776a80
      John Apostolakis authored
      Fixed power grow/shrink (was swapped) in BaseRkIntegrationDriver::ComputeNewStepLengthWithinLimits(2)
      - Added 'NA' text output for inactive lanes in FormattedReporter::ReportRowOfDoublesIf - i.e. If(Active)
      - SimpleIntegrationDriver: Small changes in printing - for comparison with new method (Rolling)
    • John Apostolakis's avatar
      Changes in deriving from Simple- and Rolling- from BaseRk- IntegrationDriver: · 6e35a248
      John Apostolakis authored
         Suppressed fErrcon, GetErrcon() and ComputeAndSetErrcon() due to problem
          getting correct value in SimpleIntegrationDriver::GetErrcon()
         - Brought back fErrcon, GetErrcon() and ComputeAndSetErrcon() to ensure
           correct value of errcon.
         - Added   assert ( errcon > 0. ) in ComputeAndSet- / Get- Errcon
         - Reintroduced code for checking (to fix this, but also provide basis of
             comparison for RollingIntegrationDriver )
         - At first commented out fErrcon, which was duplicating member
             in BaseRkIntegrationDriver<S,T>
           ===> But reconsidered, and changed:
         - Brought back fErrcon, GetErrcon() and ComputeAndSetErrcon() to ensure
           correct value of errcon.
         - Added   assert ( errcon > 0. ) in ComputeAndSet- / Get- Errcon
         - Introduced code for checking progress (printing to compare with 'Simple' )
       FieldPropagatorFactory: report creation of driver/stepper
       SimpleIntegrationDriverWithMaxPrints: fix in print.
    • John Apostolakis's avatar
      Moved 'maxRelativeError' to const member of drivers (not passed at each call to AccurateAdvance) · 76b9b591
      John Apostolakis authored
       Changes in magneticfield ( /inc/Geant and occasionally /src )
       - 'maximum relative error' is now const class member
            This removes one division from tracking code (per integration iteration)
             and move is to the *constructor*.
       - Constructor must pass 'max relative error' to base class (FlexIntegrationDriver)
       - ComputeNewStepSize method is now const
       - Revised method ComputeNewStepLengthWithinLimits2 is const and takes square error (not norm.)
       - Changed recommendations for fSmallestFraction  ( default = 1.0e-7; )
            Expected range is now 1e-5 to 1e-10
            And its value *must* be << fEpsilonRelMax
       OldIntegrationDriver<Stepper,Nvar>     ( its older version )
       ** Common changes ***
        - Constructor needs new parameter 'max relative error' (and passes it to base class BaseRkIntegrationDriver<S,N>)
        - Signature and calls to AccurateAdvance no longer have 'epsilon' argument
        - Constructor prints
            * value  of 'max Relative Epsilon' in constructor
            * values of powers for growth / shrink of step size
        -  Use ComputeNewStepLengthWithinLimits2 from BaseRkIntegrationDriver
        - Made maxRelativeError a const data member
        - Inverse of maxRelativeError is also a const data member.
          Added method that returns errpos_sq, errmom_sq and epsPosition to check/print.
        - Added 'Epsilon' as data member for own use - not just passing it to drivers
          [ TODO: review this choice -> see if a single object (or just the vector driver) can be responsible
                  for keeping epsilon. ]
        - Added one check of values of Epsilon between driver and this class.
        - Adapted to new signature of driver - adding maxRelativeEpsilon to constructors of drivers
        - Suppressed default parameter for all methods (at least for the time being) to ensure correct usage
        - Added  enumeration entries for stepper of min / max order
        - Added 'stepper' variants that enable use of Old, Simple and 'Rolling' IntegrationDriver for DoPri5
        - Added old method Report1
        - Renamed namespace to PrintDriverProgress (from ReportValuesOfVectors)
        - Added 'epsilon' to calls to driver constructors
        - Suppressed 'epsilon' from calls to AccurateAdvance
        - Suppressed 'epsilon' from calls to AccurateAdvance
        Question:  Is fEpsTol of FieldPropagationHandler related to this tolerance now held elsewhere ?  Confirm or fix
       TODO: Potential improvement
       - Use  fErrCon and similar plus  'PowerIf' to reduce use of 'power' function in
           BaseRkIntegrationDriver :: ComputeNewStepLengthWithinLimits2
         for cases in which the minimum / maximum step stretch factor would be used anyway.
         How does the time required for the power method scale with the number of 'lanes' ?
         At what value of the number of active lanes will doing a scalar 'power' be faster than the vector version ?
         Is the cross-over point at  1 (pessimistic), 2, 3 ... or N-1 (very optimistic) number of lanes ?
    • John Apostolakis's avatar
      Compilation fixes and change in interface of RollingIntegrationDriver & ErrorEstimatorSixVec · 883a6133
      John Apostolakis authored
      Fixed compilation issues, including
       - AuxVecMethods: Missing protection for double include.
      RollingIntegrationDriver:  Trial changes for performance (epsilon=>data) and check (at extra allocation cost)
      - Made EpsilonRelativeMax a data member (avoid division).
      - Reinstated badStepSize[] array.  Now allocated at run-time, so it costs a memory allocation (to Fix)
      - Change to arguments: use momentum square in EstimateError method (instead of full yEndState)
          This is to enable the use of the initial momentum magnitude square to calculate )
      - Added new method with the old signature called 'EstimateErrorWithFinalP' that uses the
          state to calculate the momentum magnitude square
          Can be used with EndState as simpler way to get the old capability & signature together.
      testVectorIntegrationDriver: Change to use RollingIntegrationDriver
    • John Apostolakis's avatar
      Cleanup of compilation issues, ownership of parameters btw BaseRk and Simple Integration Drivers · 9c2dc4b6
      John Apostolakis authored
       - Fixed compilation issues
       - Clarified ownership of member constants
           fMinimumStep  -> BaseRkIntegrationDriver     ( de-duplication: some IntegrationDriver s )
           fSmallestFraction -> BaseRkIntegrationDriver ( de-duplication: SimpleIntegrationDriver )
       - Added method to SimpleIntegrationDriver to obtain base class's protected members (!!)
           double GetSmallestFraction() const {
              return BaseRkIntegrationDriver<T_Stepper,Nvar>::GetSmallestFraction();
         Completes the set.
       - Made fSmallestFraction a const double in BaseRkIntegrationDriver
           (was non const, but without Set method ... )
         In future, can see whether it makes sense to add Set method.
       - Changed vecgeom::Pow() to Math::Pow()
      Started from following:
       - SimpleIntegrationDriver: deleted code moved to BaseRkIntegrator (it was in comments.)
       - RollingIntegrationDriver.h:
         * Reinstated version of RollingIntegrationDriver with KeepStepping from January 9th.
         * First merge of recent fixes with version that has KeepStepping.
      To be clarified:
       - why using as part of a templated (inline) class
             static constexpr double  tinyValue = 1.0e-80;
         gives a linking error in clang 10.1
             const double  tinyValue = 1.0e-80;
         just works.
    • John Apostolakis's avatar
      Added virtual destructors in driver classes. Fixed missing methods. · b530edc1
      John Apostolakis authored
      Needed to fix many duplications from conflicting changes in SimpleIntegratorDriver.h
        => these will need extra checks at the end of the merge (cherry-pick)
      In confusion, first deleted
      and then re-added it.
      To Do's:
      1) BaseRkIntegrationDriver.h is needed, but apparently not used as base of inheritance
      for SimpleIntegratorDriver or RollingIntegratorDriver.  To be clarified.
      2) In addition, there are two versions of RollingIntegratorDriver in this commit:
      The second is an earlier version plus a fix for the problem found on Monday, April 8th
      in SimpleIntegratorDriver.
        - port this fix to RollingIntegratorDriver. Then the 'Revised' version can be deleted.
      Later changes (squashed):
      Additional Smaller changes:
      - Declared RightHandSideInl method const(1 line change)
      - Changed interface ErrorEstimatorSixVec::EstimateError() to use initial Momentum^2
      - Multiple changes: derive from BaseRk + adapt, new sig of ErrorEstimate, ..
      - Suppressed statistics
      - PrintDriverProgress: Fixes in interface
      - FieldPropagatorFactory: Renamed Nvar => NumVar to avoid clash with template parameter
      - ScalarIntegrationDriver: small change of MaxNoSteps methods to *unsigned* int
      - OldIntegrationDriver: copied fix re invalide use of errmax_sq from SimpleIntegrationDriver.
      NOTE: This version still uses Square of *final* momentum to divide momentum error
      - Deleted obsolete TemplateGUIntegrationDriver.h
          ( It was the starting point for SimpleIntegrationDriver. )
    • John Apostolakis's avatar
    • John Apostolakis's avatar