Problem 1269

Summary: Found Duplicate if expressions
Product: Geant4 Reporter: a.ramazani
Component: geometry/navigationAssignee: John Apostolakis <John.Apostolakis>
Status: RESOLVED FIXED    
Severity: normal CC: a.ramazani
Priority: P5    
Version: other   
Hardware: All   
OS: All   

Description a.ramazani 2011-12-11 17:46:08 CET
Found Duplicate if expressions:
Second if never runs: decreaseFactor= 0.5; 
I guess in second if the 100.0 is not correct (may be 50.0 ?). 
// Try yet slower decreases (never runs).


file: geant4.9.5\source\geometry\navigation\src\G4PropagatorInField.cc
line: 229

     if( stepTrial > 100.0*fZeroStepThreshold )

             decreaseFactor = 0.35;     // Try decreasing slower
      
else if( stepTrial > 100.0*fZeroStepThreshold )

        decreaseFactor= 0.5;       // Try yet slower decreases
      
else if( stepTrial > 10.0*fZeroStepThreshold )
        
        decreaseFactor= 0.75;      // Try even slower decreases
      
else
        decreaseFactor= 0.9;       // Try very slow decreases
Comment 1 John Apostolakis 2012-01-09 16:51:37 CET
Thanks for pointing this out.  This is an oversight from a change in the code to make it more conservative.

Indeed it would make sense to revise the 2nd threshold (or potentially eliminate it.)
Comment 2 John Apostolakis 2012-01-31 15:51:31 CET
I have introduced a fix which reduces the 2nd threshold to 30* fZeroStepThreshold.

Thanks again - I am now closing this.
John