|
||||
File indexing completed on 2025-01-18 09:58:10
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // G4DoLoMcPriRK34 0027 // 0028 // Class description: 0029 // 0030 // Dormand-Lockyer-McGorrigan-Prince-6-3-4 non-FSAL method 0031 // ( 6 stage, 3rd & 4th order embedded RK method ) 0032 0033 // Created: Somnath Banerjee, Google Summer of Code 2015, 7 July 2015 0034 // Supervision: John Apostolakis, CERN 0035 // -------------------------------------------------------------------- 0036 #ifndef DOLO_MCPRI_RK34_HH 0037 #define DOLO_MCPRI_RK34_HH 0038 0039 #include "G4MagIntegratorStepper.hh" 0040 0041 class G4DoLoMcPriRK34 : public G4MagIntegratorStepper 0042 { 0043 public: 0044 0045 G4DoLoMcPriRK34( G4EquationOfMotion* EqRhs, 0046 G4int numberOfVariables = 6, 0047 G4bool primary = true ); 0048 // Constructor using Equation 0049 0050 ~G4DoLoMcPriRK34() override; 0051 0052 G4DoLoMcPriRK34(const G4DoLoMcPriRK34&) = delete; 0053 G4DoLoMcPriRK34& operator=(const G4DoLoMcPriRK34&) = delete; 0054 // Copy constructor and assignment operator not allowed 0055 0056 void Stepper( const G4double y[], 0057 const G4double dydx[], 0058 G4double h, 0059 G4double yout[], 0060 G4double yerr[] ) override ; 0061 0062 void SetupInterpolation(); 0063 void SetupInterpolate( const G4double yInput[], 0064 const G4double dydx[], 0065 const G4double Step ); 0066 // For Preparing the interpolation and calculating the extra stages 0067 0068 void Interpolate( const G4double yInput[], 0069 const G4double dydx[], 0070 const G4double Step, 0071 G4double yOut[], 0072 G4double tau ); 0073 // For calculating the output at the tau fraction of Step 0074 0075 void Interpolate( G4double tau, 0076 G4double yOut[]); 0077 0078 void interpolate(const G4double yInput[], 0079 const G4double dydx[], 0080 G4double yOut[], 0081 G4double Step, 0082 G4double tau ) ; 0083 0084 G4double DistChord() const override; 0085 G4int IntegratorOrder() const override { return 3; } 0086 0087 private : 0088 0089 G4double *ak2, *ak3, *ak4, *ak5, *ak6, *yTemp, *yIn; 0090 0091 G4double fLastStepLength = -1.0; 0092 G4double *fLastInitialVector, *fLastFinalVector, 0093 *fLastDyDx, *fMidVector, *fMidError; 0094 // for DistChord calculations 0095 0096 G4DoLoMcPriRK34* fAuxStepper = nullptr; 0097 }; 0098 0099 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |