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 #ifndef TYSONNOVAK2001ODESYSTEM_HPP_
00029 #define TYSONNOVAK2001ODESYSTEM_HPP_
00030
00031 #include "ChasteSerialization.hpp"
00032 #include <boost/serialization/base_object.hpp>
00033
00034 #include <cmath>
00035 #include <iostream>
00036
00037 #include "AbstractOdeSystemWithAnalyticJacobian.hpp"
00038
00043 class TysonNovak2001OdeSystem : public AbstractOdeSystemWithAnalyticJacobian
00044 {
00045 private:
00046
00052 double mK1;
00054 double mK2d;
00056 double mK2dd;
00058 double mK2ddd;
00060 double mCycB_threshold;
00062 double mK3d;
00064 double mK3dd;
00066 double mK4d;
00068 double mK4;
00070 double mJ3;
00072 double mJ4;
00074 double mK5d;
00076 double mK5dd;
00078 double mK6;
00080 double mJ5;
00082 unsigned mN;
00084 double mK7;
00086 double mK8;
00088 double mJ7;
00090 double mJ8;
00092 double mMad;
00094 double mK9;
00096 double mK10;
00098 double mK11;
00100 double mK12d;
00102 double mK12dd;
00104 double mK12ddd;
00106 double mKeq;
00108 double mK13;
00110 double mK14;
00112 double mK15d;
00114 double mK15dd;
00116 double mK16d;
00118 double mK16dd;
00120 double mJ15;
00122 double mJ16;
00124 double mMu;
00126 double mMstar;
00127
00128 friend class boost::serialization::access;
00135 template<class Archive>
00136 void serialize(Archive & archive, const unsigned int version)
00137 {
00138 archive & boost::serialization::base_object<AbstractOdeSystem>(*this);
00139 }
00140
00141 public:
00142
00148 TysonNovak2001OdeSystem(std::vector<double> stateVariables=std::vector<double>());
00149
00153 ~TysonNovak2001OdeSystem();
00154
00158 void Init();
00159
00170 void EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY);
00171
00181 bool CalculateStoppingEvent(double time, const std::vector<double>& rY);
00182
00192 double CalculateRootFunction(double time, const std::vector<double>& rY);
00193
00202 virtual void AnalyticJacobian(const std::vector<double>& rSolutionGuess, double** jacobian, double time, double timeStep);
00203 };
00204
00205
00206 #include "SerializationExportWrapper.hpp"
00207 CHASTE_CLASS_EXPORT(TysonNovak2001OdeSystem)
00208
00209 namespace boost
00210 {
00211 namespace serialization
00212 {
00216 template<class Archive>
00217 inline void save_construct_data(
00218 Archive & ar, const TysonNovak2001OdeSystem * t, const BOOST_PFTO unsigned int file_version)
00219 {
00220
00221 const std::vector<double> state_variables = t->rGetConstStateVariables();
00222 ar & state_variables;
00223 }
00224
00228 template<class Archive>
00229 inline void load_construct_data(
00230 Archive & ar, TysonNovak2001OdeSystem * t, const unsigned int file_version)
00231 {
00232
00233 std::vector<double> state_variables;
00234 ar & state_variables;
00235
00236
00237 ::new(t)TysonNovak2001OdeSystem(state_variables);
00238 }
00239 }
00240 }
00241
00242 #endif