mbsim  4.0.0
MBSim Kernel
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
explicit_euler_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  */
19 
20 #ifndef _EXPLICIT_EULER_INTEGRATOR_H_
21 #define _EXPLICIT_EULER_INTEGRATOR_H_
22 
23 #include "integrator.h"
24 
25 namespace MBSim {
26 
29  public:
33  ~ExplicitEulerIntegrator() override = default;
34 
35  void preIntegrate() override;
36  void subIntegrate(double tStop) override;
37  void postIntegrate() override;
38 
39  /* INHERITED INTERFACE OF INTEGRATOR */
41  void integrate() override;
42  void initializeUsingXML(xercesc::DOMElement *element) override;
43  /***************************************************/
44 
45  /* GETTER / SETTER */
46  void setStepSize(double dt_) {dt = dt_;}
47  /***************************************************/
48 
49  private:
53  double dt{1e-3};
54 
55  double tPlot;
56  int iter, step, integrationSteps;
57  double s0, time;
58  int stepPlot;
59  };
60 
61 }
62 
63 #endif
Explicit Euler integrator.
Definition: explicit_euler_integrator.h:28
integrator-interface for dynamic systems
Definition: integrator.h:37
virtual void integrate()=0
start the integration of the system set by setSystem. Each class implemeting this function should cal...
~ExplicitEulerIntegrator() override=default
destructor
void integrate() override
start the integration of the system set by setSystem. Each class implemeting this function should cal...
Definition: explicit_euler_integrator.cc:96
double dt
step size
Definition: explicit_euler_integrator.h:53