00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _RADAU5_INTEGRATOR_H_
00024 #define _RADAU5_INTEGRATOR_H_
00025
00026 #include "integrator.h"
00027
00028 namespace MBSimIntegrator {
00029
00032 class RADAU5Integrator : public Integrator {
00033
00034 private:
00035
00036 static void fzdot(int* n, double* t, double* z, double* zd, double* rpar, int* ipar);
00037 static void plot(int* nr, double* told, double* t, double* z, double* cont, int* lrc, int* n, double* rpar, int* ipar, int* irtrn);
00038
00039 static double tPlot;
00040 static double dtOut;
00041 static fmatvec::Vec zInp;
00042 static std::ofstream integPlot;
00043 static double s0;
00044 static double time;
00045 static bool output_;
00046
00048 fmatvec::Vec aTol;
00050 fmatvec::Vec rTol;
00052 double dt0;
00054 int maxSteps;
00056 double dtMax;
00057
00058 public:
00059
00060 RADAU5Integrator();
00061 ~RADAU5Integrator() {}
00062
00063 void setAbsoluteTolerance(const fmatvec::Vec &aTol_) {aTol = aTol_;}
00064 void setAbsoluteTolerance(double aTol_) {aTol = fmatvec::Vec(1,fmatvec::INIT,aTol_);}
00065 void setRelativeTolerance(const fmatvec::Vec &rTol_) {rTol = rTol_;}
00066 void setRelativeTolerance(double rTol_) {rTol = fmatvec::Vec(1,fmatvec::INIT,rTol_);}
00067 void setInitialStepSize(double dt0_) {dt0 = dt0_;}
00068 void setMaximalStepSize(double dtMax_) {dtMax = dtMax_;}
00069 void setMaxStepNumber(int maxSteps_) {maxSteps = maxSteps_;}
00070
00071 void integrate(MBSim::DynamicSystemSolver& system);
00072
00073 virtual void initializeUsingXML(xercesc::DOMElement *element);
00074 };
00075
00076 }
00077
00078 #endif