Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4MagErrorStepper.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// G4MagErrorStepper
27//
28// Class description:
29//
30// Abstract base class for integrator of particle's equation of motion,
31// used in tracking in space dependent magnetic field.
32
33// Author: W.Wander <wwc@mit.edu>, 09.12.1997
34// --------------------------------------------------------------------
35#ifndef G4MAGERRORSTEPPER_HH
36#define G4MAGERRORSTEPPER_HH
37
38#include "G4Types.hh"
40#include "G4Mag_EqRhs.hh"
41#include "G4ThreeVector.hh"
42
44{
45 public:
46
48 G4int numberOfVariables,
49 G4int numStateVariables = 12);
50 ~G4MagErrorStepper() override;
51
54
55 void Stepper( const G4double y[],
56 const G4double dydx[],
57 G4double h,
58 G4double yout[],
59 G4double yerr[] ) override;
60 // The stepper for the Runge Kutta integration. The stepsize
61 // is fixed, with the Step size given by h.
62 // Integrates ODE starting values y[0 to 6].
63 // Outputs yout[] and its estimated error yerr[].
64
65 virtual void DumbStepper( const G4double y[],
66 const G4double dydx[],
67 G4double h,
68 G4double yout[] ) = 0;
69 // Performs a 'dump' Step without error calculation.
70
71 G4double DistChord() const override;
72
73 private:
74
75 // STATE
76 G4ThreeVector fInitialPoint, fMidPoint, fFinalPoint;
77 // Data stored in order to find the chord
78
79 // Dependent Objects, owned --- part of the STATE
80 G4double *yInitial, *yMiddle, *dydxMid, *yOneStep;
81 // The following arrays are used only for temporary storage
82 // they are allocated at the class level only for efficiency -
83 // so that calls to new and delete are not made in Stepper().
84};
85
86#include "G4MagErrorStepper.icc"
87
88#endif
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
G4double DistChord() const override
void Stepper(const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[]) override
virtual void DumbStepper(const G4double y[], const G4double dydx[], G4double h, G4double yout[])=0
G4MagErrorStepper(G4EquationOfMotion *EqRhs, G4int numberOfVariables, G4int numStateVariables=12)
G4MagErrorStepper(const G4MagErrorStepper &)=delete
G4MagErrorStepper & operator=(const G4MagErrorStepper &)=delete
~G4MagErrorStepper() override