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.6 2001/03/23 18:50:33 japost Exp $ >> 9 // GEANT4 tag $Name: geant4-03-01 $ >> 10 // >> 11 // >> 12 // class G4RKG3_Stepper 27 // 13 // 28 // Class description: 14 // Class description: 29 // 15 // 30 // Runga-Kutta integrator stepper from Geant3. << 16 // Integrator Runga-Kutta Stepper from Geant3. >> 17 >> 18 // History: >> 19 // - Created. J.Apostolakis, V.Grichine - 30.01.97 31 20 32 // Created: J.Apostolakis, V.Grichine - 30.01. << 21 #ifndef G4RKG3_Stepper_hh 33 // ------------------------------------------- << 22 #define G4RKG3_Stepper_hh 34 #ifndef G4RKG3_STEPPER_HH << 35 #define G4RKG3_STEPPER_HH << 36 23 37 #include "G4Types.hh" << 38 #include "G4MagIntegratorStepper.hh" 24 #include "G4MagIntegratorStepper.hh" 39 #include "G4ThreeVector.hh" 25 #include "G4ThreeVector.hh" 40 << 26 #include "G4Mag_EqRhs.hh" 41 class G4Mag_EqRhs; << 42 27 43 class G4RKG3_Stepper : public G4MagIntegratorS 28 class G4RKG3_Stepper : public G4MagIntegratorStepper 44 { 29 { 45 public: << 30 public: // with description 46 31 47 G4RKG3_Stepper(G4Mag_EqRhs* EqRhs); << 32 G4RKG3_Stepper(G4Mag_EqRhs *EqRhs) >> 33 : G4MagIntegratorStepper(EqRhs,6){;} 48 // Integrate over 6 variables only: pos 34 // Integrate over 6 variables only: position & velocity. 49 // Not implemented yet ! << 50 35 51 ~G4RKG3_Stepper() override; << 36 ~G4RKG3_Stepper(){;} 52 37 53 void Stepper( const G4double yIn[], 38 void Stepper( const G4double yIn[], 54 const G4double dydx[], << 39 const G4double dydx[], 55 G4double h, << 40 G4double h, 56 G4double yOut[], << 41 G4double yOut[], 57 G4double yErr[] ) over << 42 G4double yErr[] ); 58 // The method which must be provided, ev 43 // The method which must be provided, even if less efficient. 59 44 60 G4double DistChord() const override ; << 45 G4double DistChord() const ; 61 46 62 void StepNoErr( const G4double tIn[8], << 47 void StepNoErr( const G4double tIn[7], 63 const G4double dydx[6], << 48 const G4double dydx[7], 64 G4double Step, << 49 G4double Step, 65 G4double tOut[8], << 50 G4double tOut[7], 66 G4double B[3] ); << 51 G4double B[3] ); 67 // Integrator RK Stepper from G3 with on 52 // Integrator RK Stepper from G3 with only two field evaluation per 68 // Step. It is used in propagation initi 53 // Step. It is used in propagation initial Step by small substeps 69 // after solution error and delta geomet 54 // after solution error and delta geometry considerations. 70 // B[3] is magnetic field which is passe 55 // B[3] is magnetic field which is passed from substep to substep. 71 56 72 void StepWithEst( const G4double tIn[8], << 57 void StepWithEst( const G4double tIn[7], 73 const G4double dydx[6], << 58 const G4double dydx[7], 74 G4double Step, << 59 G4double Step, 75 G4double tOut[8], << 60 G4double tOut[7], 76 G4double& alpha2, << 61 G4double& alpha2, // to delete ? 77 G4double& beta2, << 62 G4double& beta2, 78 const G4double B1[3], << 63 const G4double B1[3], 79 G4double B2[3] ); << 64 G4double B2[3] ); 80 // Integrator for RK from G3 with evalua << 65 // Integrator for RK from G3 with evaluation of error in solution and delta 81 // delta geometry based on naive similar << 66 // geometry based on naive similarity with the case of uniform magnetic field. 82 // magnetic field. << 83 // B1[3] is input and is the first magn 67 // B1[3] is input and is the first magnetic field values 84 // B2[3] is output and is the final magn 68 // B2[3] is output and is the final magnetic field values. 85 69 86 inline G4int IntegratorOrder() const overr << 70 public: // without description >> 71 >> 72 G4int IntegratorOrder() const { return 4; } >> 73 >> 74 protected: >> 75 // void Field( const G4double Point[3], >> 76 // G4double Bfield[3] ) const >> 77 // { EqRhs-> GetFieldValue( Point, Bfield ) ; } 87 78 88 private: 79 private: 89 80 90 G4ThreeVector fyInitial, 81 G4ThreeVector fyInitial, 91 fyMidPoint, << 82 fyMidPoint, 92 fyFinal; << 83 fyFinal ; 93 G4ThreeVector fpInitial; << 94 G4ThreeVector BfldIn; << 95 G4double hStep = 0.0; << 96 }; 84 }; 97 85 98 #endif 86 #endif 99 87