MBSim

Project Page
time_stepping_d1minuslinear_integrator.h
00001 /* Copyright (C) 2004-2011 MBSim Development Team
00002  *
00003  * This library is free software; you can redistribute it and/or 
00004  * modify it under the terms of the GNU Lesser General Public 
00005  * License as published by the Free Software Foundation; either 
00006  * version 2.1 of the License, or (at your option) any later version. 
00007  *  
00008  * This library is distributed in the hope that it will be useful, 
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of 
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
00011  * Lesser General Public License for more details. 
00012  *  
00013  * You should have received a copy of the GNU Lesser General Public 
00014  * License along with this library; if not, write to the Free Software 
00015  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
00016  *
00017  * Contact: thschindler@users.berlios.de
00018  */
00019 
00020 #ifndef _D1MINUSLINEAR_H_ 
00021 #define _D1MINUSLINEAR_H_
00022 
00023 #include "integrator.h"
00024 
00025 namespace MBSimIntegrator {
00026 
00036   class TimeSteppingD1MinusLinearIntegrator : public Integrator { 
00037     public:
00041       TimeSteppingD1MinusLinearIntegrator();
00042       
00046       virtual ~TimeSteppingD1MinusLinearIntegrator() {}
00047 
00048       void preIntegrate(MBSim::DynamicSystemSolver& system);
00049       void subIntegrate(MBSim::DynamicSystemSolver& system, double tStop);
00050       void postIntegrate(MBSim::DynamicSystemSolver& system);
00051 
00052       /* INHERITED INTERFACE OF INTEGRATOR */
00053       virtual void integrate(MBSim::DynamicSystemSolver& system);
00054       virtual void initializeUsingXML(xercesc::DOMElement *element);
00055       /***************************************************/
00056 
00057       /* GETTER / SETTER */
00058       void setStepSize(double dt_) { dt = dt_; }
00059       /***************************************************/
00060     
00061     private:
00065       double dt;
00066 
00070       double t, tPlot;
00071 
00075       int iter, step, integrationSteps, maxIter, sumIter;
00076 
00080       double s0, time;
00081 
00085       int stepPlot;
00086 
00090       fmatvec::Vec z, q, u, x;
00091 
00095       std::ofstream integPlot;
00096 
00097       TimeSteppingD1MinusLinearIntegrator(const TimeSteppingD1MinusLinearIntegrator&); // copy constructor
00098       TimeSteppingD1MinusLinearIntegrator& operator=(const TimeSteppingD1MinusLinearIntegrator&); // assignment operator
00099   };
00100 
00101 }
00102 
00103 #endif /* _TIME_STEPPING_INTEGRATOR_H_ */
00104