Geant4 Cross Reference |
>> 1 // This code implementation is the intellectual property of >> 2 // the GEANT4 collaboration. 1 // 3 // 2 // ******************************************* << 4 // By copying, distributing or modifying the Program (or any work 3 // * License and Disclaimer << 5 // based on the Program) you indicate your acceptance of this statement, 4 // * << 6 // and all its terms. 5 // * The Geant4 software is copyright of th << 6 // * the Geant4 Collaboration. It is provided << 7 // * conditions of the Geant4 Software License << 8 // * LICENSE and available at http://cern.ch/ << 9 // * include a list of copyright holders. << 10 // * << 11 // * Neither the authors of this software syst << 12 // * institutes,nor the agencies providing fin << 13 // * work make any representation or warran << 14 // * regarding this software system or assum << 15 // * use. Please see the license in the file << 16 // * for the full disclaimer and the limitatio << 17 // * << 18 // * This code implementation is the result << 19 // * technical work of the GEANT4 collaboratio << 20 // * By using, copying, modifying or distri << 21 // * any work based on the software) you ag << 22 // * use in resulting scientific publicati << 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* << 25 // 7 // 26 // G4RKG3_Stepper << 8 // $Id: G4RKG3_Stepper.hh,v 1.2.8.1 1999/12/07 20:48:02 gunter Exp $ >> 9 // GEANT4 tag $Name: geant4-01-00 $ 27 // 10 // 28 // Class description: << 29 // 11 // 30 // Runga-Kutta integrator stepper from Geant3. << 12 // J.Apostolakis, V.Grichine 30.01.97 31 13 32 // Created: J.Apostolakis, V.Grichine - 30.01. << 33 // ------------------------------------------- << 34 #ifndef G4RKG3_STEPPER_HH << 35 #define G4RKG3_STEPPER_HH << 36 << 37 #include "G4Types.hh" << 38 #include "G4MagIntegratorStepper.hh" 14 #include "G4MagIntegratorStepper.hh" 39 #include "G4ThreeVector.hh" 15 #include "G4ThreeVector.hh" 40 16 41 class G4Mag_EqRhs; << 42 << 43 class G4RKG3_Stepper : public G4MagIntegratorS 17 class G4RKG3_Stepper : public G4MagIntegratorStepper 44 { 18 { 45 public: << 19 public: >> 20 G4RKG3_Stepper(G4Mag_EqRhs *EqRhs): G4MagIntegratorStepper(EqRhs,6){}; >> 21 // integrate over 6 variables only: position & velocity >> 22 ~G4RKG3_Stepper(){}; >> 23 >> 24 // The method it must provide, even if less efficiently >> 25 >> 26 void >> 27 Stepper( const G4double yIn[], >> 28 const G4double dydx[], >> 29 const G4double h, >> 30 G4double yOut[], >> 31 G4double yErr[] ); >> 32 // G4double& beta2) const 46 33 47 G4RKG3_Stepper(G4Mag_EqRhs* EqRhs); << 34 G4double DistChord() const ; 48 // Integrate over 6 variables only: pos << 49 // Not implemented yet ! << 50 << 51 ~G4RKG3_Stepper() override; << 52 << 53 void Stepper( const G4double yIn[], << 54 const G4double dydx[], << 55 G4double h, << 56 G4double yOut[], << 57 G4double yErr[] ) over << 58 // The method which must be provided, ev << 59 << 60 G4double DistChord() const override ; << 61 35 62 void StepNoErr( const G4double tIn[8], << 36 // Additional "optimised" methods: 63 const G4double dydx[6], << 37 64 G4double Step, << 38 // Integrator RK Stepper from G3 with only two field evaluation per 65 G4double tOut[8], << 39 // Step. It is used in propagation initial Step by small substeps 66 G4double B[3] ); << 40 // after solution error and delta geometry considerations. 67 // Integrator RK Stepper from G3 with on << 41 // B[3] is magnetic field which is passed from substep to substep. 68 // Step. It is used in propagation initi << 42 69 // after solution error and delta geomet << 43 void StepNoErr( const G4double tIn[7], 70 // B[3] is magnetic field which is passe << 44 const G4double dydx[7], 71 << 45 const G4double Step, 72 void StepWithEst( const G4double tIn[8], << 46 G4double tOut[7], 73 const G4double dydx[6], << 47 G4double B[3] ); 74 G4double Step, << 48 75 G4double tOut[8], << 49 void StepWithEst(const G4double tIn[7], 76 G4double& alpha2, << 50 const G4double dydx[7], 77 G4double& beta2, << 51 const G4double Step, 78 const G4double B1[3], << 52 G4double tOut[7], 79 G4double B2[3] ); << 53 // G4double tError[6], 80 // Integrator for RK from G3 with evalua << 54 G4double& alpha2, // to delete ? 81 // delta geometry based on naive similar << 55 G4double& beta2, 82 // magnetic field. << 56 const G4double B1[3], 83 // B1[3] is input and is the first magn << 57 G4double B3[3] ); 84 // B2[3] is output and is the final magn << 58 85 << 59 G4int IntegratorOrder() { return 4; }; 86 inline G4int IntegratorOrder() const overr << 60 87 << 61 protected: 88 private: << 62 // void Field( const double Point[3], 89 << 63 // double Bfield[3] ) const 90 G4ThreeVector fyInitial, << 64 // { EqRhs-> GetFieldValue( Point, Bfield ) ; } 91 fyMidPoint, << 65 private: 92 fyFinal; << 66 G4ThreeVector fyInitial, 93 G4ThreeVector fpInitial; << 67 fyMidPoint, 94 G4ThreeVector BfldIn; << 68 fyFinal ; 95 G4double hStep = 0.0; << 96 }; 69 }; 97 70 98 #endif << 99 71