Import Geant4 10.3.0 source tree
This commit is contained in:
@@ -1,3 +1,28 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Bogacki-Shampine - 4 - 3(2) non-FSAL implementation by Somnath Banerjee
|
||||
// Supervision / code review: John Apostolakis
|
||||
//
|
||||
@@ -5,10 +30,6 @@
|
||||
//
|
||||
// First version: 20 May 2015
|
||||
//
|
||||
// This code is made available subject to the Geant4 license, a copy of
|
||||
// which is available at
|
||||
// http://geant4.org/license
|
||||
//
|
||||
// History
|
||||
// -----------------------------
|
||||
// Created by Somnath Banerjee on 20 May 2015
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Bogacki-Shampine's RK 5(4) non-FSAL implementation by Somnath Banerjee
|
||||
// Supervision / code review: John Apostolakis
|
||||
//
|
||||
@@ -5,10 +30,6 @@
|
||||
//
|
||||
// First version: 25 May 2015
|
||||
//
|
||||
// This code is made available subject to the Geant4 license, a copy of
|
||||
// which is available at
|
||||
// http://geant4.org/license
|
||||
//
|
||||
// History
|
||||
// -----------------------------
|
||||
// Created by Somnath Banerjee on May-August 2015
|
||||
@@ -56,6 +77,7 @@ G4BogackiShampine45::G4BogackiShampine45(G4EquationOfMotion *EqRhs,
|
||||
G4int noIntegrationVariables,
|
||||
G4bool primary)
|
||||
: G4MagIntegratorStepper(EqRhs, noIntegrationVariables),
|
||||
fAuxStepper(0),
|
||||
fPreparedInterpolation(false)
|
||||
{
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ChordFinder.cc 97812 2016-06-14 07:57:41Z gcosmo $
|
||||
// $Id: G4ChordFinder.cc 101384 2016-11-16 11:03:44Z gcosmo $
|
||||
//
|
||||
//
|
||||
// 25.02.97 - John Apostolakis - Design and implementation
|
||||
@@ -248,7 +248,7 @@ G4ChordFinder::FindNextChord( const G4FieldTrack& yStart,
|
||||
fIntgrDriver-> GetDerivatives( yCurrent, dydx );
|
||||
|
||||
unsigned int noTrials=0;
|
||||
const unsigned int maxTrials= 300; // Avoid endless loop for bad convergence
|
||||
const unsigned int maxTrials= 75; // Avoid endless loop for bad convergence
|
||||
|
||||
const G4double safetyFactor= fFirstFraction; // 0.975 or 0.99 ? was 0.999
|
||||
|
||||
@@ -258,8 +258,7 @@ G4ChordFinder::FindNextChord( const G4FieldTrack& yStart,
|
||||
G4double stepForChord;
|
||||
do
|
||||
{
|
||||
yCurrent = yStart; // Always start from initial point
|
||||
|
||||
yCurrent = yStart; // Always start from initial point
|
||||
// ************
|
||||
fIntgrDriver->QuickAdvance( yCurrent, dydx, stepTrial,
|
||||
dChordStep, dyErrPos);
|
||||
@@ -291,7 +290,8 @@ G4ChordFinder::FindNextChord( const G4FieldTrack& yStart,
|
||||
}
|
||||
noTrials++;
|
||||
}
|
||||
while( (! validEndPoint) && (noTrials < maxTrials) ); // End of do-while RKD
|
||||
while( (! validEndPoint) && (noTrials < maxTrials) );
|
||||
// Loop checking, 07.10.2016, J. Apostolakis
|
||||
|
||||
if( noTrials >= maxTrials )
|
||||
{
|
||||
|
||||
@@ -139,7 +139,9 @@ G4ChordFinderSaf::FindNextChord( const G4FieldTrack& yStart,
|
||||
|
||||
GetIntegrationDriver()-> GetDerivatives( yCurrent, dydx ) ;
|
||||
|
||||
G4int noTrials=0;
|
||||
unsigned int noTrials=0;
|
||||
const unsigned int maxTrials= 75; // Avoid endless loop for bad convergence
|
||||
|
||||
const G4double safetyFactor= GetFirstFraction(); // was 0.999
|
||||
|
||||
// Figure out the starting safety
|
||||
@@ -155,10 +157,10 @@ G4ChordFinderSaf::FindNextChord( const G4FieldTrack& yStart,
|
||||
stepTrial = std::min( stepMax, likelyGood );
|
||||
|
||||
G4MagInt_Driver *pIntgrDriver= G4ChordFinder::GetIntegrationDriver();
|
||||
G4double newStepEst_Uncons= 0.0;
|
||||
G4double newStepEst_Uncons= 0.0;
|
||||
G4double stepForChord= -1.0;
|
||||
do
|
||||
{
|
||||
G4double stepForChord;
|
||||
yCurrent = yStart; // Always start from initial point
|
||||
|
||||
// ************
|
||||
@@ -198,8 +200,22 @@ G4ChordFinderSaf::FindNextChord( const G4FieldTrack& yStart,
|
||||
|
||||
noTrials++;
|
||||
}
|
||||
while( ! validEndPoint ); // End of do-while RKD
|
||||
while( (! validEndPoint) && (noTrials < maxTrials) );
|
||||
// Loop checking, 07.10.2016, J. Apostolakis
|
||||
|
||||
if( noTrials >= maxTrials )
|
||||
{
|
||||
std::ostringstream message;
|
||||
message << "Exceeded maximum number of trials= " << maxTrials << G4endl
|
||||
<< "Current sagita dist= " << dChordStep << G4endl
|
||||
<< "Step sizes (actual and proposed): " << G4endl
|
||||
<< "Last trial = " << lastStepLength << G4endl
|
||||
<< "Next trial = " << stepTrial << G4endl
|
||||
<< "Proposed for chord = " << stepForChord << G4endl
|
||||
;
|
||||
G4Exception("G4ChordFinderSaf::FindNextChord()", "GeomField0003",
|
||||
JustWarning, message);
|
||||
}
|
||||
AccumulateStatistics( noTrials );
|
||||
|
||||
// Should we update newStepEst_Uncons for a 'long step' via safety ??
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Dormand-Lockyer-McGorrigan-Prince-6-3-4 non-FSAL implementation
|
||||
// RK4(3)6FD - forced Non-FSAL
|
||||
//
|
||||
@@ -7,9 +32,6 @@
|
||||
//
|
||||
// First version: 7 July 2015
|
||||
//
|
||||
// This code is made available subject to the Geant4 license, a copy of
|
||||
// which is available at
|
||||
// http://geant4.org/license
|
||||
// G4DoLoMcPriRK34.cc
|
||||
// Geant4
|
||||
//
|
||||
@@ -31,7 +53,8 @@
|
||||
G4DoLoMcPriRK34::G4DoLoMcPriRK34(G4EquationOfMotion *EqRhs,
|
||||
G4int noIntegrationVariables,
|
||||
G4bool primary)
|
||||
: G4MagIntegratorStepper(EqRhs, noIntegrationVariables)
|
||||
: G4MagIntegratorStepper(EqRhs, noIntegrationVariables),
|
||||
fAuxStepper(0)
|
||||
{
|
||||
const G4int numberOfVariables = noIntegrationVariables;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DormandPrince745.cc 97598 2016-06-06 07:19:46Z gcosmo $
|
||||
// $Id: G4DormandPrince745.cc 101384 2016-11-16 11:03:44Z gcosmo $
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
@@ -71,7 +71,8 @@
|
||||
G4DormandPrince745::G4DormandPrince745(G4EquationOfMotion *EqRhs,
|
||||
G4int noIntegrationVariables,
|
||||
G4bool primary)
|
||||
: G4MagIntegratorStepper(EqRhs, noIntegrationVariables)
|
||||
: G4MagIntegratorStepper(EqRhs, noIntegrationVariables),
|
||||
fAuxStepper(0)
|
||||
{
|
||||
const G4int numberOfVariables = // noIntegrationVariables;
|
||||
std::max( noIntegrationVariables,
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// FDormand-Prince RK 6(5) FSAL implementation by Somnath Banerjee
|
||||
// Supervision / code review: John Apostolakis
|
||||
//
|
||||
@@ -5,9 +30,6 @@
|
||||
//
|
||||
// First version: 26 June 2015
|
||||
//
|
||||
// This code is made available subject to the Geant4 license, a copy of
|
||||
// which is available at
|
||||
// http://geant4.org/license
|
||||
// G4DormandPrince745.cc
|
||||
// Geant4
|
||||
//
|
||||
@@ -25,7 +47,9 @@
|
||||
G4DormandPrinceRK56::G4DormandPrinceRK56(G4EquationOfMotion *EqRhs,
|
||||
G4int noIntegrationVariables,
|
||||
G4bool primary)
|
||||
: G4MagIntegratorStepper(EqRhs, noIntegrationVariables){
|
||||
: G4MagIntegratorStepper(EqRhs, noIntegrationVariables),
|
||||
fAuxStepper(0)
|
||||
{
|
||||
|
||||
const G4int numberOfVariables = noIntegrationVariables;
|
||||
|
||||
|
||||
@@ -1,4 +1,28 @@
|
||||
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Dormand-Prince 8(7)13M non-FSAL implementation by Somnath Banerjee
|
||||
// Supervision / code review: John Apostolakis
|
||||
//
|
||||
@@ -6,10 +30,6 @@
|
||||
//
|
||||
// First version: 28 June 2015
|
||||
//
|
||||
// This code is made available subject to the Geant4 license, a copy of
|
||||
// which is available at
|
||||
// http://geant4.org/license
|
||||
//
|
||||
// DormandPrinceRK78.cc
|
||||
// Geant4
|
||||
//
|
||||
|
||||
@@ -1,4 +1,28 @@
|
||||
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// DormandPrince7 - 5(4) implementation by Somnath Banerjee
|
||||
// Supervision / code review: John Apostolakis
|
||||
//
|
||||
@@ -6,10 +30,6 @@
|
||||
//
|
||||
// First version: 25 May 2015
|
||||
//
|
||||
// This code is made available subject to the Geant4 license, a copy of
|
||||
// which is available at
|
||||
// http://geant4.org/license
|
||||
//
|
||||
// G4FSALDormandPrince745.cc
|
||||
// Geant4
|
||||
//
|
||||
|
||||
@@ -1,4 +1,28 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: FSALMagIntegratorDriver.cc
|
||||
//
|
||||
//
|
||||
@@ -366,6 +390,8 @@ G4FSALIntegrationDriver::AccurateAdvance(G4FieldTrack& y_current,
|
||||
}
|
||||
}
|
||||
} while ( ((nstp++)<=fMaxNoSteps) && (x < x2) && (!lastStep) );
|
||||
// Loop checking, 07.10.2016, J. Apostolakis
|
||||
|
||||
// Have we reached the end ?
|
||||
// --> a better test might be x-x2 > an_epsilon
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MagIntegratorDriver.cc 81175 2014-05-22 07:39:10Z gcosmo $
|
||||
// $Id: G4MagIntegratorDriver.cc 101384 2016-11-16 11:03:44Z gcosmo $
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -389,6 +389,8 @@ G4MagInt_Driver::AccurateAdvance(G4FieldTrack& y_current,
|
||||
}
|
||||
}
|
||||
} while ( ((nstp++)<=fMaxNoSteps) && (x < x2) && (!lastStep) );
|
||||
// Loop checking, 07.10.2016, J. Apostolakis
|
||||
|
||||
// Have we reached the end ?
|
||||
// --> a better test might be x-x2 > an_epsilon
|
||||
|
||||
|
||||
@@ -1,4 +1,28 @@
|
||||
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// Tsitouras - 5(4) RK steppers ( non-FSAL version )
|
||||
//
|
||||
@@ -15,10 +39,6 @@
|
||||
//
|
||||
// First version: 12 June 2015
|
||||
//
|
||||
// This code is made available subject to the Geant4 license, a copy of
|
||||
// which is available at
|
||||
// http://geant4.org/license
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#include "G4TsitourasRK45.hh"
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
|
||||
#include "G4VFSALIntegrationStepper.hh"
|
||||
|
||||
Reference in New Issue
Block a user