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 _ABSTRACTONESTEPIVPODESOLVER_HPP_
00030 #define _ABSTRACTONESTEPIVPODESOLVER_HPP_
00031
00032 #include "ChasteSerialization.hpp"
00033 #include "ClassIsAbstract.hpp"
00034 #include <boost/serialization/base_object.hpp>
00035
00036 #include "AbstractIvpOdeSolver.hpp"
00037
00042 class AbstractOneStepIvpOdeSolver : public AbstractIvpOdeSolver
00043 {
00044
00045 private:
00046
00048 friend class boost::serialization::access;
00055 template<class Archive>
00056 void serialize(Archive & archive, const unsigned int version)
00057 {
00058
00059 archive & boost::serialization::base_object<AbstractIvpOdeSolver>(*this);
00060 }
00061
00065 std::vector<double> mWorkingMemory;
00066
00067 protected:
00068
00080 virtual void InternalSolve(AbstractOdeSystem* pAbstractOdeSystem,
00081 std::vector<double>& rCurrentYValues,
00082 std::vector<double>& rWorkingMemory,
00083 double startTime,
00084 double endTime,
00085 double timeStep);
00086
00097 virtual void CalculateNextYValue(AbstractOdeSystem* pAbstractOdeSystem,
00098 double timeStep,
00099 double time,
00100 std::vector<double>& rCurrentYValues,
00101 std::vector<double>& rNextYValues)=0;
00102
00103 public:
00104
00131 virtual OdeSolution Solve(AbstractOdeSystem* pAbstractOdeSystem,
00132 std::vector<double>& rYValues,
00133 double startTime,
00134 double endTime,
00135 double timeStep,
00136 double timeSampling);
00137
00160 virtual void Solve(AbstractOdeSystem* pAbstractOdeSystem,
00161 std::vector<double>& rYValues,
00162 double startTime,
00163 double endTime,
00164 double timeStep);
00165
00169 virtual ~AbstractOneStepIvpOdeSolver()
00170 {}
00171 };
00172
00173 CLASS_IS_ABSTRACT(AbstractOneStepIvpOdeSolver)
00174
00175 #endif //_ABSTRACTONESTEPIVPODESOLVER_HPP_