AbstractIvpOdeSolver.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 _ABSTRACTIVPODESOLVER_HPP_
00037 #define _ABSTRACTIVPODESOLVER_HPP_
00038
00039 #include <vector>
00040
00041 #include "ChasteSerialization.hpp"
00042 #include "ClassIsAbstract.hpp"
00043 #include "Identifiable.hpp"
00044
00045 #include "OdeSolution.hpp"
00046 #include "AbstractOdeSystem.hpp"
00047
00052 class AbstractIvpOdeSolver : public Identifiable
00053 {
00055 friend class boost::serialization::access;
00062 template<class Archive>
00063 void serialize(Archive & archive, const unsigned int version)
00064 {
00065 archive & mStoppingEventOccurred;
00066 archive & mStoppingTime;
00067 }
00068
00069 protected:
00070
00075 bool mStoppingEventOccurred;
00076
00078 double mStoppingTime;
00079
00080 public:
00081
00101 virtual OdeSolution Solve(AbstractOdeSystem* pAbstractOdeSystem,
00102 std::vector<double>& rYValues,
00103 double startTime,
00104 double endTime,
00105 double timeStep,
00106 double timeSampling)=0;
00107
00123 virtual void Solve(AbstractOdeSystem* pAbstractOdeSystem,
00124 std::vector<double>& rYValues,
00125 double startTime,
00126 double endTime,
00127 double timeStep)=0;
00128
00139 virtual void SolveAndUpdateStateVariable(AbstractOdeSystem* pAbstractOdeSystem,
00140 double startTime,
00141 double endTime,
00142 double timeStep);
00143
00148 bool StoppingEventOccurred();
00149
00155 double GetStoppingTime();
00156
00160 AbstractIvpOdeSolver();
00161
00165 virtual ~AbstractIvpOdeSolver();
00166
00167 };
00168
00169 CLASS_IS_ABSTRACT(AbstractIvpOdeSolver)
00170
00171 #endif //_ABSTRACTIVPODESOLVER_HPP_