MURE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
DynamicalSystem.hxx
Go to the documentation of this file.
1 #ifndef _DynamicalSystem_
2 #define _DynamicalSystem_
3 
8 #include <math.h>
9 #include <vector>
10 #include "MureHeaders.hxx"
11 
12 
13 using namespace std;
14 
15 //-----------------------------------------------------------------------------//
16 
17 
18 
20 
32 //________________________________________________________________________
33 
35 {
36  public :
37 
38  DynamicalSystem();
39  DynamicalSystem(const DynamicalSystem & DS);
40  virtual ~DynamicalSystem();
41 
46  int GetNumberOfEquationSize(){return fNVar;}
47  void SetNumberOfEquationSize(int n){fNVar=n;}
48 
49 
55 
56  void SetPrecision(double eps=1e-5){fPrecision=eps;}
57 
59 
65  void SetForbidNegativeValue(){fIsNegativeValueAllowed=false;}
66 
68 
73  void RungeKutta(double *YStart, double t1, double t2);
74 
76 
82  virtual void BuildEqns(double t, double *Y, double *dYdt){}
83 
85 
90 
92 
93  protected :
95 
103  void RK4(double *y, double *dydx, double x, double h, double *yout);
105 
116  void AdaptStepSize(double *y, double *dydx, double *x, double htry, double eps, double *yscal, double *hdid, double *hnext);
117 
118  int fNVar;
119  double fPrecision;
120  double fHestimate;
121  double fHmin;
122  double fMaxHdid;
123  double fMinHdid;
125 };
126 
127 #endif
128 
double fMinHdid
store the effective RK min step
Definition: DynamicalSystem.hxx:123
virtual void BuildEqns(double t, double *Y, double *dYdt)
Builds the equations for integration.
Definition: DynamicalSystem.hxx:82
double fMaxHdid
store the effective RK max step
Definition: DynamicalSystem.hxx:122
bool fIsNegativeValueAllowed
whether or not negative value are physical.
Definition: DynamicalSystem.hxx:124
double fHmin
RK minimum Step.
Definition: DynamicalSystem.hxx:121
void SetPrecision(double eps=1e-5)
set RK precision to change the integration step
Definition: DynamicalSystem.hxx:56
File including all headers.
double fHestimate
RK Step estimation.
Definition: DynamicalSystem.hxx:120
void SetNumberOfEquationSize(int n)
set the number of equations.
Definition: DynamicalSystem.hxx:47
double fPrecision
Precision of the RungeKutta.
Definition: DynamicalSystem.hxx:119
int fNVar
The size of the composition vector and /or number of ZAIs involved.
Definition: DynamicalSystem.hxx:118
DynamicalSystem class solves system of differential equations.
Definition: DynamicalSystem.hxx:34
void SetForbidNegativeValue()
Forbid negative value during integration.
Definition: DynamicalSystem.hxx:65
int GetNumberOfEquationSize()
return the number of equations.
Definition: DynamicalSystem.hxx:46

MURE Project, documentation generated by Doxygen 1.8.5 - Mon Nov 17 2014