00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _TIME_STEPPING_INTEGRATOR_H_
00021 #define _TIME_STEPPING_INTEGRATOR_H_
00022
00023 #include "integrator.h"
00024
00025 namespace MBSimIntegrator {
00026
00032 class TimeSteppingIntegrator : public Integrator {
00033 public:
00037 TimeSteppingIntegrator();
00038
00042 virtual ~TimeSteppingIntegrator() {}
00043
00044 void preIntegrate(MBSim::DynamicSystemSolver& system);
00045 void subIntegrate(MBSim::DynamicSystemSolver& system, double tStop);
00046 void postIntegrate(MBSim::DynamicSystemSolver& system);
00047
00048
00049 virtual void integrate(MBSim::DynamicSystemSolver& system);
00050 virtual void initializeUsingXML(xercesc::DOMElement *element);
00051
00052
00053
00054 void setStepSize(double dt_) { dt = dt_; }
00055 void setDriftCompensation(bool dc) { driftCompensation = dc; }
00056
00057
00058 private:
00062 double dt;
00063
00067 double t, tPlot;
00068
00072 int iter,step, integrationSteps, maxIter, sumIter;
00073
00077 double s0, time;
00078
00082 int stepPlot;
00083
00087 fmatvec::Vec z, q, u, x;
00088
00092 std::ofstream integPlot;
00093
00097 bool driftCompensation;
00098 };
00099
00100 }
00101
00102 #endif
00103