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 HEARTCONFIGRELATEDCELLFACTORY_HPP_
00030 #define HEARTCONFIGRELATEDCELLFACTORY_HPP_
00031
00032 #include <vector>
00033 #include <map>
00034 #include <boost/shared_ptr.hpp>
00035
00036 #include "AbstractCardiacCellFactory.hpp"
00037 #include "HeartConfig.hpp"
00038
00039 #include "AbstractStimulusFunction.hpp"
00040 #include "MultiStimulus.hpp"
00041 #include "SimpleStimulus.hpp"
00042
00043 #include "ChasteCuboid.hpp"
00044 #include "AbstractChasteRegion.hpp"
00045
00046 #include "DynamicCellModelLoader.hpp"
00047
00048
00049
00050
00051
00052
00053 #include "DiFrancescoNoble1985.hpp"
00054 #include "FaberRudy2000.hpp"
00055 #include "FaberRudy2000Opt.hpp"
00056 #include "FoxModel2002BackwardEuler.hpp"
00057 #include "HodgkinHuxley1952.hpp"
00058 #include "LuoRudy1991.hpp"
00059 #include "LuoRudy1991BackwardEuler.hpp"
00060 #include "Mahajan2008.hpp"
00061 #include "Maleckar2008.hpp"
00062 #include "TenTusscher2006Epi.hpp"
00063
00064
00065
00066
00067
00068 #include "FoxModel2002.hpp"
00069 #include "FoxModel2002Opt.hpp"
00070 #include "LuoRudy1991Opt.hpp"
00071 #include "Mahajan2008Opt.hpp"
00072 #include "Mahajan2008BackwardEuler.hpp"
00073 #include "Maleckar2008Opt.hpp"
00074 #include "NobleVargheseKohlNoble1998a.hpp"
00075 #include "NobleVargheseKohlNoble1998aOpt.hpp"
00076 #include "NobleVargheseKohlNoble1998aBackwardEuler.hpp"
00077 #include "Shannon2004.hpp"
00078 #include "TenTusscher2006EpiOpt.hpp"
00079 #include "TenTusscher2006EpiBackwardEuler.hpp"
00080
00088 template<unsigned SPACE_DIM>
00089 class HeartConfigRelatedCellFactory : public AbstractCardiacCellFactory<SPACE_DIM>
00090 {
00091 private:
00093 cp::ionic_model_selection_type mDefaultIonicModel;
00095 std::vector<boost::shared_ptr<AbstractChasteRegion<SPACE_DIM> > > mIonicModelRegions;
00097 std::vector<cp::ionic_model_selection_type> mIonicModelsDefined;
00098
00100 std::vector<boost::shared_ptr<AbstractChasteRegion<SPACE_DIM> > > mStimulatedAreas;
00102 std::vector<boost::shared_ptr<AbstractStimulusFunction> > mStimuliApplied;
00103
00115 std::vector<boost::shared_ptr<AbstractChasteRegion<SPACE_DIM> > > mCellHeterogeneityAreas;
00117 std::vector<double> mScaleFactorGks;
00119 std::vector<double> mScaleFactorIto;
00121 std::vector<double> mScaleFactorGkr;
00122
00124 std::vector<std::map<std::string, double> > mParameterSettings;
00125
00132 void PreconvertCellmlFiles();
00133
00139 DynamicCellModelLoader* LoadDynamicModel(const cp::ionic_model_selection_type& rModel,
00140 bool isCollective);
00141
00142 public:
00148 HeartConfigRelatedCellFactory();
00149
00151 ~HeartConfigRelatedCellFactory();
00152
00158 AbstractCardiacCell* CreateCellWithIntracellularStimulus(
00159 boost::shared_ptr<AbstractStimulusFunction> intracellularStimulus,
00160 unsigned nodeIndex);
00161
00169 AbstractCardiacCell* CreateCardiacCellForTissueNode(unsigned nodeIndex);
00170
00174 void FillInCellularTransmuralAreas();
00175
00182 void SetCellParameters(AbstractCardiacCell* pCell, unsigned nodeIndex);
00183
00190 void SetCellIntracellularStimulus(AbstractCardiacCell* pCell, unsigned nodeIndex);
00191 };
00192
00193
00194 #endif