RungeKutta4IvpOdeSolver.hpp
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 "ChasteSerialization.hpp"
00033 #include <boost/serialization/base_object.hpp>
00034
00035 #include "AbstractOneStepIvpOdeSolver.hpp"
00036
00041 class RungeKutta4IvpOdeSolver : public AbstractOneStepIvpOdeSolver
00042 {
00043 private:
00044
00046 friend class boost::serialization::access;
00053 template<class Archive>
00054 void serialize(Archive & archive, const unsigned int version)
00055 {
00056
00057 archive & boost::serialization::base_object<AbstractOneStepIvpOdeSolver>(*this);
00058 }
00059
00060 protected:
00061
00071 void CalculateNextYValue(AbstractOdeSystem* pAbstractOdeSystem,
00072 double timeStep,
00073 double time,
00074 std::vector<double>& rCurrentYValues,
00075 std::vector<double>& rNextYValues);
00076
00077 private:
00078
00079 std::vector<double> k1;
00080 std::vector<double> k2;
00081 std::vector<double> k3;
00082 std::vector<double> k4;
00083 std::vector<double> yki;
00085 };
00086
00087 #include "SerializationExportWrapper.hpp"
00088 CHASTE_CLASS_EXPORT(RungeKutta4IvpOdeSolver);
00089
00090 #endif //_RUNGEKUTTA4IVPODESOLVER_HPP_