Files
geant4/source/geometry/magneticfield/include/G4MagIntegratorDriver.icc
T
2016-06-08 16:57:27 +02:00

161 lines
3.9 KiB
Plaintext

//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4MagIntegratorDriver.icc,v 1.7 2001/10/25 09:11:09 japost Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
inline
G4double G4MagInt_Driver::GetHmin() const
{
return hminimum_val;
}
inline
G4double G4MagInt_Driver::Hmin() const
{
return hminimum_val;
}
inline
G4double G4MagInt_Driver::GetSafety() const
{
return safety;
}
inline
G4double G4MagInt_Driver::GetPshrnk() const
{
return pshrnk;
}
inline
G4double G4MagInt_Driver::GetPgrow() const
{
return pgrow;
}
inline
G4double G4MagInt_Driver::GetErrcon() const
{
return errcon;
}
inline
void G4MagInt_Driver::SetHmin(G4double newval)
{
hminimum_val = newval;
}
inline
G4double G4MagInt_Driver::ComputeAndSetErrcon()
{
errcon = pow(max_stepping_increase/GetSafety(),1.0/GetPgrow());
return errcon;
}
inline
void G4MagInt_Driver::ReSetParameters(G4double new_safety)
{
safety = new_safety;
pshrnk = -1.0 / pIntStepper->IntegratorOrder();
pgrow = -1.0 / (1.0 + pIntStepper->IntegratorOrder());
ComputeAndSetErrcon();
}
inline
void G4MagInt_Driver::SetSafety(G4double val)
{
safety=val;
ComputeAndSetErrcon();
}
inline
void G4MagInt_Driver::SetPgrow(G4double val)
{
pgrow=val;
ComputeAndSetErrcon();
}
inline
void G4MagInt_Driver::SetErrcon(G4double val)
{
errcon=val;
}
inline
void G4MagInt_Driver::RenewStepperAndAdjust(G4MagIntegratorStepper *pItsStepper)
{
pIntStepper = pItsStepper;
ReSetParameters();
}
inline
void G4MagInt_Driver::SetChargeMomentumMass(G4double particleCharge, // e+
G4double MomentumXc,
G4double Mass )
{
pIntStepper->GetEquationOfMotion()
->SetChargeMomentumMass(particleCharge, MomentumXc, Mass);
}
inline
const G4MagIntegratorStepper* G4MagInt_Driver::GetStepper() const
{
return pIntStepper;
}
inline
G4int G4MagInt_Driver::GetMaxNoSteps() const
{
return fMaxNoSteps;
}
inline
void G4MagInt_Driver::SetMaxNoSteps(G4int val)
{
fMaxNoSteps= val;
}
inline
void G4MagInt_Driver::GetDerivatives(const G4FieldTrack y_curr, // const, INput
G4double dydx[]) // OUTput
{
G4double tmpValArr[G4FieldTrack::ncompSVEC];
y_curr.DumpToArray( tmpValArr );
pIntStepper -> RightHandSide( tmpValArr , dydx );
}
inline
G4double G4MagInt_Driver::GetVerboseLevel() const
{
return fVerboseLevel;
}
inline
void G4MagInt_Driver::SetVerboseLevel( int newLevel)
{
fVerboseLevel= newLevel;
}