00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _ODEX_INTEGRATOR_H_
00024 #define _ODEX_INTEGRATOR_H_
00025
00026 #include "integrator.h"
00027
00028 namespace MBSim {
00029
00033 class ODEXIntegrator : public Integrator {
00034
00035 private:
00036
00037 static void fzdot(int* n, double* t, double* z, double* zd, double* rpar, int* ipar);
00038 static void plot(int* nr, double* told, double* t,double* z, int* n, double* con, int *ncon, int* icomp, int* nd, double* rpar, int* ipar, int* irtrn);
00039
00040 static double tPlot;
00041 static double dtOut;
00042 static fmatvec::Vec zInp;
00043 static std::ofstream integPlot;
00044 static double s0;
00045 static double time;
00046 static bool output_;
00047
00049 fmatvec::Vec aTol;
00051 fmatvec::Vec rTol;
00053 double dt0;
00055 int maxSteps;
00056
00057 public:
00058
00059 ODEXIntegrator();
00060 ~ODEXIntegrator() {}
00061
00062 void setAbsoluteTolerance(const fmatvec::Vec &aTol_) {aTol = aTol_;}
00063 void setAbsoluteTolerance(double aTol_) {aTol = fmatvec::Vec(1,fmatvec::INIT,aTol_);}
00064 void setRelativeTolernace(const fmatvec::Vec &rTol_) {rTol = rTol_;}
00065 void setRelativeTolernace(double rTol_) {rTol = fmatvec::Vec(1,fmatvec::INIT,rTol_);}
00066 void setInitialStepSize(double dt0_) {dt0 = dt0_;}
00067
00068
00069 void integrate(DynamicSystemSolver& system);
00070
00071 };
00072
00073 }
00074
00075 #endif