00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _THETA_TIME_STEPPING_SSC_INTEGRATOR_H_
00021 #define _THETA_TIME_STEPPING_SSC_INTEGRATOR_H_
00022
00023 #include "integrator.h"
00024
00025 namespace MBSim {
00026
00031 class ThetaTimeSteppingSSCIntegrator : public Integrator {
00032 public:
00036 ThetaTimeSteppingSSCIntegrator();
00037
00041 virtual ~ThetaTimeSteppingSSCIntegrator() {}
00042
00043
00044 void integrate(DynamicSystemSolver& system);
00045 virtual void initializeUsingXML(xercesc::DOMElement *element);
00046
00047
00048
00049 void setStepSize(double dt_) { dt = dt_; }
00050 void setTheta(double theta_ ) { theta = theta_; }
00051 void setDriftCompensation(bool dc) { driftCompensation = dc; }
00052
00053
00060 void update(DynamicSystemSolver& system, const fmatvec::Vec& z, double t);
00061
00066 void preIntegrate(DynamicSystemSolver& system);
00067
00074 void subIntegrate(DynamicSystemSolver& system, double tStop);
00079 void postIntegrate(DynamicSystemSolver& system);
00080
00081 private:
00085 double dt;
00086
00090 double theta;
00091
00095 double t, tPlot;
00096
00100 int iter,step, integrationSteps, maxIter, sumIter;
00101
00105 double s0, time;
00106
00110 int stepPlot;
00111
00115 fmatvec::Vec z, q, u, x;
00116
00120 std::ofstream integPlot;
00121
00125 bool driftCompensation;
00126 };
00127
00128 }
00129
00130 #endif
00131