ODESolver.h 1.5 KB
Newer Older
1
/**
2 3
 * \file        ODESolver.h
 * \date        Aug 17, 2010
4 5
 * \version     v0.7
 * \copyright   <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved.
Ulrich Kemloh's avatar
Ulrich Kemloh committed
6
 *
7
 * \section License
8 9 10
 * This file is part of JuPedSim.
 *
 * JuPedSim is free software: you can redistribute it and/or modify
11
 * it under the terms of the GNU Lesser General Public License as published by
12 13 14 15 16 17 18 19
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 *
 * JuPedSim is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
20
 * You should have received a copy of the GNU Lesser General Public License
21 22
 * along with JuPedSim. If not, see <http://www.gnu.org/licenses/>.
 *
23
 * \section Description
24 25
 *
 *
26 27
 **/

Ulrich Kemloh's avatar
Ulrich Kemloh committed
28 29

#ifndef _ODESOLVER_H
Mohcine Chraibi's avatar
Mohcine Chraibi committed
30
#define _ODESOLVER_H
Ulrich Kemloh's avatar
Ulrich Kemloh committed
31 32


33 34 35
//forward declarations
class ForceModel;
class Building;
Ulrich Kemloh's avatar
Ulrich Kemloh committed
36

37 38 39 40

/**
 * General template for ODE solvers
 */
Ulrich Kemloh's avatar
Ulrich Kemloh committed
41
class ODESolver {
42 43 44
protected:
     ForceModel *model;
public:
45
     ODESolver(ForceModel* tmodel);
46 47
     virtual ~ODESolver() {};
     virtual void solveODE(double t, double tp, Building* building) const = 0;
Ulrich Kemloh's avatar
Ulrich Kemloh committed
48 49 50
};


51 52 53
/**
 * Implementation of the explicit  Euler method for solving different equations.
 */
Ulrich Kemloh's avatar
Ulrich Kemloh committed
54

Ulrich Kemloh's avatar
Ulrich Kemloh committed
55
class EulerSolver : public ODESolver {
56
public:
57
     EulerSolver(ForceModel *tmodel);
58
     virtual void solveODE(double t, double tp, Building* building) const;
Ulrich Kemloh's avatar
Ulrich Kemloh committed
59 60 61 62
};



Mohcine Chraibi's avatar
Mohcine Chraibi committed
63
#endif  /* _ODESOLVER_H */
Ulrich Kemloh's avatar
Ulrich Kemloh committed
64