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