MBSim
Project Page
Main Page
Related Pages
Namespaces
Classes
Files
File List
mbsim
integrators
theta_time_stepping_integrator.h
1
/* Copyright (C) 2004-2009 MBSim Development Team
2
*
3
* This library is free software; you can redistribute it and/or
4
* modify it under the terms of the GNU Lesser General Public
5
* License as published by the Free Software Foundation; either
6
* version 2.1 of the License, or (at your option) any later version.
7
*
8
* This library is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
* Lesser General Public License for more details.
12
*
13
* You should have received a copy of the GNU Lesser General Public
14
* License along with this library; if not, write to the Free Software
15
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
*
17
* Contact: martin.o.foerg@googlemail.com
18
* rzander@users.berlios.de
19
*/
20
21
#ifndef _MU_TIME_STEPPING_INTEGRATOR_H_
22
#define _MU_TIME_STEPPING_INTEGRATOR_H_
23
24
#include "fmatvec.h"
25
#include "mbsim/integrators/integrator.h"
26
27
namespace
MBSim {
28
38
class
ThetaTimeSteppingIntegrator
:
public
Integrator
{
39
public
:
43
ThetaTimeSteppingIntegrator
();
44
48
virtual
~ThetaTimeSteppingIntegrator
() {}
49
50
/* INHERITED INTERFACE OF INTEGRATOR */
51
void
integrate
(
DynamicSystemSolver
&
system
);
52
virtual
void
initializeUsingXML
(TiXmlElement *element);
53
/***************************************************/
54
55
/* GETTER / SETTER */
56
void
setStepSize(
double
dt_) {
dt
= dt_; }
57
void
setTheta(
double
theta_ ) {
theta
= theta_; }
58
void
setDriftCompensation(
bool
dc) {
driftCompensation
= dc; }
59
/***************************************************/
60
67
void
update
(DynamicSystemSolver&
system
,
const
fmatvec::Vec&
z
,
double
t
);
68
73
void
preIntegrate
(DynamicSystemSolver&
system
);
74
81
void
subIntegrate
(DynamicSystemSolver&
system
,
double
tStop);
86
void
postIntegrate
(DynamicSystemSolver&
system
);
87
88
private
:
92
double
dt
;
93
97
double
theta
;
98
102
double
t
, tPlot;
103
107
int
iter
,step, integrationSteps, maxIter, sumIter;
108
112
double
s0
, time;
113
117
int
stepPlot
;
118
122
fmatvec::Vec
z
, q, u, x;
123
127
std::ofstream
integPlot
;
128
132
bool
driftCompensation
;
133
};
134
135
}
136
137
#endif
/* _MU_TIME_STEPPING_INTEGRATOR_H_ */
138
Generated by
1.8.1.1