51 : fnvar(nvar), m_eps_rel(eps_rel), m_midpoint(equation,nvar),
52 m_last_step_rejected(false), m_first(true), m_dt_last(0.0), m_max_dt(max_dt)
67 for(
G4int k = 0; k < i; ++k)
71 m_coeff[i][k] = 1.0 / (r * r - 1.0);
144 / static_cast<G4double>(
m_cost[k]);
176 / static_cast<G4double>(
m_cost[k]);
246 for(
G4int j = k - 1 ; j > 0; --j)
266 G4double facmin = std::pow(STEPFAC3, expo);
275 fac = STEPFAC2 / std::pow(error / STEPFAC1 , expo);
298 else if( (
work[k] < KFAC2 *
work[k-1])
332 return error > d *
d;
338 return error > d *
d;
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4double h_opt[m_k_max+1]
G4bool m_last_step_rejected
G4BulirschStoer(G4EquationOfMotion *equation, G4int nvar, G4double eps_rel, G4double max_dt=DBL_MAX)
G4double m_table[m_k_max][G4FieldTrack::ncompSVEC]
G4double relativeError(const G4double y[], const G4double yerr[], const G4double hstep, const G4double errorTolerance=1)
G4bool set_k_opt(size_t k, G4double &dt)
G4ModifiedMidpoint m_midpoint
void DoStep(const G4double yIn[], const G4double dydxIn[], G4double yOut[], G4double hstep) const
G4bool should_reject(G4double error, G4int k) const
G4int m_interval_sequence[m_k_max+1]
G4double m_err[G4FieldTrack::ncompSVEC]
G4double calc_h_opt(G4double h, G4double error, size_t k) const
G4bool in_convergence_window(G4int k) const
step_result try_step(const G4double in[], const G4double dxdt[], G4double &t, G4double out[], G4double &dt)
G4double m_coeff[m_k_max+1][m_k_max]
static const G4double fac
static const G4int m_k_max
void extrapolate(size_t k, G4double xest[])
static PROLOG_HANDLER error
void SetSteps(G4int steps)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments