Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:03:27

0001 #ifndef _SimpleRKStepper_h_
0002 #define _SimpleRKStepper_h_
0003 #include "CLHEP/GenericFunctions/RKIntegrator.hh"
0004 //
0005 // This is a stepper that steps with stepsize h using an
0006 // Explicit Runge-Kutte method determined by a Butcher
0007 // tableau. 
0008 //
0009 // The stepsize is therefore not adaptively determined;
0010 // so this type of stepper is mostly useful in attempting
0011 // to categorize the different explicit RK Algorithms
0012 // and probably not for real-life problems unless one has
0013 // some a priori knowledge about how to set the stepsize.
0014 //
0015 #include "CLHEP/GenericFunctions/ButcherTableau.hh"
0016 namespace Genfun {
0017   class SimpleRKStepper:public RKIntegrator::RKStepper{
0018     
0019   public:
0020     
0021     // Constructor:
0022     SimpleRKStepper(const ButcherTableau & tableau,
0023             double stepsize);
0024 
0025     // Destructor:
0026     virtual ~SimpleRKStepper();
0027 
0028     // Take a step:
0029     virtual void step (const RKIntegrator::RKData       * data,  // functions 
0030                const RKIntegrator::RKData::Data & sdata, // start point
0031                RKIntegrator::RKData::Data       & ddata, // end point
0032                double                         timeLimit  // time limit 
0033                ) const ;
0034     // Clone:
0035     virtual SimpleRKStepper *clone() const;
0036     
0037 private:
0038 
0039   ButcherTableau tableau;
0040   double stepsize;
0041 
0042   };
0043 }
0044 
0045 #endif