source: trunk/source/geometry/magneticfield/include/G4MagIntegratorDriver.icc@ 1036

Last change on this file since 1036 was 921, checked in by garnier, 17 years ago

en test de gl2ps. Problemes de libraries

File size: 4.3 KB
Line 
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//
27// $Id: G4MagIntegratorDriver.icc,v 1.13 2007/05/10 10:10:48 japost Exp $
28// GEANT4 tag $Name: geant4-09-02-cand-01 $
29//
30// --------------------------------------------------------------------
31
32inline
33G4double G4MagInt_Driver::GetHmin() const
34{
35 return fMinimumStep;
36}
37
38inline
39G4double G4MagInt_Driver::Hmin() const
40{
41 return fMinimumStep;
42}
43
44inline
45G4double G4MagInt_Driver::GetSafety() const
46{
47 return safety;
48}
49
50inline
51G4double G4MagInt_Driver::GetPshrnk() const
52{
53 return pshrnk;
54}
55
56inline
57G4double G4MagInt_Driver::GetPgrow() const
58{
59 return pgrow;
60}
61
62inline
63G4double G4MagInt_Driver::GetErrcon() const
64{
65 return errcon;
66}
67
68inline
69void G4MagInt_Driver::SetHmin(G4double newval)
70{
71 fMinimumStep = newval;
72}
73
74inline
75G4double G4MagInt_Driver::ComputeAndSetErrcon()
76{
77 errcon = std::pow(max_stepping_increase/GetSafety(),1.0/GetPgrow());
78 return errcon;
79}
80
81inline
82void G4MagInt_Driver::ReSetParameters(G4double new_safety)
83{
84 safety = new_safety;
85 pshrnk = -1.0 / pIntStepper->IntegratorOrder();
86 pgrow = -1.0 / (1.0 + pIntStepper->IntegratorOrder());
87 ComputeAndSetErrcon();
88}
89
90inline
91void G4MagInt_Driver::SetSafety(G4double val)
92{
93 safety=val;
94 ComputeAndSetErrcon();
95}
96
97inline
98void G4MagInt_Driver::SetPgrow(G4double val)
99{
100 pgrow=val;
101 ComputeAndSetErrcon();
102}
103
104inline
105void G4MagInt_Driver::SetErrcon(G4double val)
106{
107 errcon=val;
108}
109
110inline
111void G4MagInt_Driver::RenewStepperAndAdjust(G4MagIntegratorStepper *pItsStepper)
112{
113 pIntStepper = pItsStepper;
114 ReSetParameters();
115}
116
117inline
118void G4MagInt_Driver::SetChargeMomentumMass(G4double particleCharge, // e+
119 G4double MomentumXc,
120 G4double Mass )
121{
122 pIntStepper->GetEquationOfMotion()
123 ->SetChargeMomentumMass(particleCharge, MomentumXc, Mass);
124}
125
126inline
127const G4MagIntegratorStepper* G4MagInt_Driver::GetStepper() const
128{
129 return pIntStepper;
130}
131
132inline
133G4int G4MagInt_Driver::GetMaxNoSteps() const
134{
135 return fMaxNoSteps;
136}
137
138inline
139void G4MagInt_Driver::SetMaxNoSteps(G4int val)
140{
141 fMaxNoSteps= val;
142}
143
144inline
145void G4MagInt_Driver::GetDerivatives(const G4FieldTrack &y_curr, // const, INput
146 G4double dydx[]) // OUTput
147{
148 G4double tmpValArr[G4FieldTrack::ncompSVEC];
149 y_curr.DumpToArray( tmpValArr );
150 pIntStepper -> RightHandSide( tmpValArr , dydx );
151}
152
153inline
154G4double G4MagInt_Driver::GetVerboseLevel() const
155{
156 return fVerboseLevel;
157}
158
159inline
160void G4MagInt_Driver::SetVerboseLevel(G4int newLevel)
161{
162 fVerboseLevel= newLevel;
163}
164
165inline
166G4double G4MagInt_Driver::GetSmallestFraction() const
167{
168 return fSmallestFraction;
169}
Note: See TracBrowser for help on using the repository browser.