00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _MU_TIME_STEPPING_INTEGRATOR_H_
00022 #define _MU_TIME_STEPPING_INTEGRATOR_H_
00023
00024 #include "integrator.h"
00025
00026 namespace MBSimIntegrator {
00027
00037 class ThetaTimeSteppingIntegrator : public Integrator {
00038 public:
00042 ThetaTimeSteppingIntegrator();
00043
00047 virtual ~ThetaTimeSteppingIntegrator() {}
00048
00049
00050 void integrate(MBSim::DynamicSystemSolver& system);
00051 virtual void initializeUsingXML(xercesc::DOMElement *element);
00052
00053
00054
00055 void setStepSize(double dt_) { dt = dt_; }
00056 void setTheta(double theta_ ) { theta = theta_; }
00057 void setDriftCompensation(bool dc) { driftCompensation = dc; }
00058
00059
00066 void update(MBSim::DynamicSystemSolver& system, const fmatvec::Vec& z, double t);
00067
00072 void preIntegrate(MBSim::DynamicSystemSolver& system);
00073
00079 void subIntegrate(MBSim::DynamicSystemSolver& system, double tStop);
00080
00085 void postIntegrate(MBSim::DynamicSystemSolver& system);
00086
00087 private:
00091 double dt;
00092
00096 double theta;
00097
00101 double t, tPlot;
00102
00106 int iter,step, integrationSteps, maxIter, sumIter;
00107
00111 double s0, time;
00112
00116 int stepPlot;
00117
00121 fmatvec::Vec z, q, u, x;
00122
00126 std::ofstream integPlot;
00127
00131 bool driftCompensation;
00132 };
00133
00134 }
00135
00136 #endif
00137