AbstractOneStepIvpOdeSolver.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
00030
00031
00032
00033
00034
00035
00036 #ifndef _ABSTRACTONESTEPIVPODESOLVER_HPP_
00037 #define _ABSTRACTONESTEPIVPODESOLVER_HPP_
00038
00039 #include "ChasteSerialization.hpp"
00040 #include "ClassIsAbstract.hpp"
00041 #include <boost/serialization/base_object.hpp>
00042
00043 #include "AbstractIvpOdeSolver.hpp"
00044
00049 class AbstractOneStepIvpOdeSolver : public AbstractIvpOdeSolver
00050 {
00051
00052 private:
00053
00055 friend class boost::serialization::access;
00062 template<class Archive>
00063 void serialize(Archive & archive, const unsigned int version)
00064 {
00065
00066 archive & boost::serialization::base_object<AbstractIvpOdeSolver>(*this);
00067 }
00068
00072 std::vector<double> mWorkingMemory;
00073
00074 protected:
00075
00087 virtual void InternalSolve(AbstractOdeSystem* pAbstractOdeSystem,
00088 std::vector<double>& rCurrentYValues,
00089 std::vector<double>& rWorkingMemory,
00090 double startTime,
00091 double endTime,
00092 double timeStep);
00093
00104 virtual void CalculateNextYValue(AbstractOdeSystem* pAbstractOdeSystem,
00105 double timeStep,
00106 double time,
00107 std::vector<double>& rCurrentYValues,
00108 std::vector<double>& rNextYValues)=0;
00109
00110 public:
00111
00138 virtual OdeSolution Solve(AbstractOdeSystem* pAbstractOdeSystem,
00139 std::vector<double>& rYValues,
00140 double startTime,
00141 double endTime,
00142 double timeStep,
00143 double timeSampling);
00144
00167 virtual void Solve(AbstractOdeSystem* pAbstractOdeSystem,
00168 std::vector<double>& rYValues,
00169 double startTime,
00170 double endTime,
00171 double timeStep);
00172
00176 virtual ~AbstractOneStepIvpOdeSolver()
00177 {}
00178 };
00179
00180 CLASS_IS_ABSTRACT(AbstractOneStepIvpOdeSolver)
00181
00182 #endif //_ABSTRACTONESTEPIVPODESOLVER_HPP_