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5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

  1 // ********************************************************************
  2 // * License and Disclaimer                                           *
  3 // *                                                                  *
  4 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  5 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  6 // * conditions of the Geant4 Software License,  included in the file *
  7 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  8 // * include a list of copyright holders.                             *
  9 // *                                                                  *
 10 // * Neither the authors of this software system, nor their employing *
 11 // * institutes,nor the agencies providing financial support for this *
 12 // * work  make  any representation or  warranty, express or implied, *
 13 // * regarding  this  software system or assume any liability for its *
 14 // * use.  Please see the license in the file  LICENSE  and URL above *
 15 // * for the full disclaimer and the limitation of liability.         *
 16 // *                                                                  *
 17 // * This  code  implementation is the result of  the  scientific and *
 18 // * technical work of the GEANT4 collaboration.                      *
 19 // * By using,  copying,  modifying or  distributing the software (or *
 20 // * any work based  on the software)  you  agree  to acknowledge its *
 21 // * use  in  resulting  scientific  publications,  and indicate your *
 22 // * acceptance of all terms of the Geant4 Software license.          *
 23 // ********************************************************************
 24 //
 25 // G4RK547FEq1
 26 //
 27 // Class description:
 28 //
 29 // An implementation of the 7 stage embedded Runge-Kutta 4,5 pair (RK547FEq1)
 30 // from the paper:
 31 //   D. J. Higham and G. Hall,
 32 //   "Embedded Runge-Kutta formulae with stable equilibrium states",
 33 //   J. Comput. Appl. Math., vol. 29, no. 1, pp. 25-33, 1990.
 34 
 35 // Author: Dmitry Sorokin, Google Summer of Code 2017
 36 // Supervision: John Apostolakis, CERN
 37 // --------------------------------------------------------------------
 38 #ifndef G4RK547FEQ1_HH
 39 #define G4RK547FEQ1_HH
 40 
 41 #include "G4MagIntegratorStepper.hh"
 42 #include "G4FieldTrack.hh"
 43 
 44 class G4RK547FEq1 : public G4MagIntegratorStepper
 45 {
 46   public:
 47 
 48     G4RK547FEq1(G4EquationOfMotion* EqRhs, G4int integrationVariables = 6);
 49 
 50     G4RK547FEq1(const G4RK547FEq1&) = delete;
 51     G4RK547FEq1& operator= (const G4RK547FEq1&) = delete;
 52 
 53     void Stepper( const G4double yInput[],
 54                   const G4double dydx[],
 55                         G4double hstep,
 56                         G4double yOutput[],
 57                         G4double yError[] ) override;
 58 
 59     void Stepper( const G4double yInput[],
 60                   const G4double dydx[],
 61                         G4double hstep,
 62                         G4double yOutput[],
 63                         G4double yError[],
 64                         G4double dydxOutput[] );
 65 
 66     G4double DistChord() const override;
 67     G4int IntegratorOrder() const override { return 4; }
 68 
 69   private:
 70 
 71     void makeStep( const G4double yInput[],
 72                    const G4double dydx[],
 73                    const G4double hstep,
 74                          G4double yOutput[],
 75                          G4double* dydxOutput = nullptr,
 76                          G4double* yError = nullptr) const;
 77 
 78   private:
 79 
 80     G4double fyIn[G4FieldTrack::ncompSVEC],
 81              fdydx[G4FieldTrack::ncompSVEC],
 82              fyOut[G4FieldTrack::ncompSVEC],
 83              fdydxOut[G4FieldTrack::ncompSVEC];
 84 
 85     G4double fhstep = -1.0;
 86 };
 87 
 88 #endif
 89