Problem 1269 - Found Duplicate if expressions
Summary: Found Duplicate if expressions
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: geometry/navigation (show other problems)
Version: other
Hardware: All All
: P5 normal
Assignee: John Apostolakis
URL:
Depends on:
Blocks:
 
Reported: 2011-12-11 17:46 CET by a.ramazani
Modified: 2012-01-31 15:51 CET (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
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