File indexing completed on 2025-01-30 10:03:24
0001 #ifndef _AdaptiveRKStepper_h_
0002 #define _AdaptiveRKStepper_h_
0003 #include "CLHEP/GenericFunctions/RKIntegrator.hh"
0004
0005
0006
0007
0008 namespace Genfun {
0009
0010 class AdaptiveRKStepper:public RKIntegrator::RKStepper {
0011
0012 public:
0013
0014 class EEStepper;
0015
0016
0017
0018
0019
0020 AdaptiveRKStepper(const EEStepper *eeStepper=NULL);
0021
0022
0023 AdaptiveRKStepper(const AdaptiveRKStepper & right);
0024
0025
0026 virtual ~AdaptiveRKStepper();
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040 virtual void step (const RKIntegrator::RKData * data,
0041 const RKIntegrator::RKData::Data & sdata,
0042 RKIntegrator::RKData::Data & ddata,
0043 double timeLimit) const ;
0044
0045 virtual AdaptiveRKStepper *clone() const;
0046
0047
0048
0049
0050
0051
0052
0053 double & tolerance();
0054 const double & tolerance() const;
0055
0056
0057 double & startingStepsize();
0058 const double & startingStepsize() const;
0059
0060
0061
0062 double & safetyFactor();
0063 const double & safetyFactor() const;
0064
0065
0066 double & rmin();
0067 const double & rmin() const;
0068
0069
0070 double & rmax();
0071 const double & rmax() const;
0072
0073
0074 private:
0075
0076
0077 AdaptiveRKStepper & operator=(const AdaptiveRKStepper & right);
0078
0079 const EEStepper *eeStepper;
0080 double T;
0081 double sStepsize;
0082 double S;
0083 double Rmin;
0084 double Rmax;
0085 mutable double stepsize;
0086 };
0087
0088
0089
0090
0091
0092
0093 class AdaptiveRKStepper::EEStepper {
0094 public:
0095
0096 virtual ~EEStepper();
0097 virtual void step (const RKIntegrator::RKData * data,
0098 const RKIntegrator::RKData::Data & sdata,
0099 RKIntegrator::RKData::Data & ddata,
0100 std::vector<double> & errors) const = 0;
0101 virtual EEStepper *clone() const=0;
0102 virtual unsigned int order() const=0;
0103 };
0104 }
0105
0106 #endif