00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _RUNGEKUTTA4IVPODESOLVER_HPP_
00030 #define _RUNGEKUTTA4IVPODESOLVER_HPP_
00031
00032 #include <boost/serialization/access.hpp>
00033 #include <boost/serialization/base_object.hpp>
00034
00035 #include "AbstractOneStepIvpOdeSolver.hpp"
00036
00037
00038 #include <boost/serialization/export.hpp>
00039
00044 class RungeKutta4IvpOdeSolver : public AbstractOneStepIvpOdeSolver
00045 {
00046 private:
00047
00049 friend class boost::serialization::access;
00056 template<class Archive>
00057 void serialize(Archive & archive, const unsigned int version)
00058 {
00059
00060 archive & boost::serialization::base_object<AbstractOneStepIvpOdeSolver>(*this);
00061 }
00062
00063 protected:
00064
00074 void CalculateNextYValue(AbstractOdeSystem* pAbstractOdeSystem,
00075 double timeStep,
00076 double time,
00077 std::vector<double>& rCurrentYValues,
00078 std::vector<double>& rNextYValues);
00079
00080 private:
00081
00082 std::vector<double> k1;
00083 std::vector<double> k2;
00084 std::vector<double> k3;
00085 std::vector<double> k4;
00086 std::vector<double> yki;
00088 };
00089
00090 BOOST_CLASS_EXPORT(RungeKutta4IvpOdeSolver);
00091
00092 #endif //_RUNGEKUTTA4IVPODESOLVER_HPP_