HeartConfigRelatedCellFactory.hpp

00001 /*
00002 
00003 Copyright (C) University of Oxford, 2005-2010
00004 
00005 University of Oxford means the Chancellor, Masters and Scholars of the
00006 University of Oxford, having an administrative office at Wellington
00007 Square, Oxford OX1 2JD, UK.
00008 
00009 This file is part of Chaste.
00010 
00011 Chaste is free software: you can redistribute it and/or modify it
00012 under the terms of the GNU Lesser General Public License as published
00013 by the Free Software Foundation, either version 2.1 of the License, or
00014 (at your option) any later version.
00015 
00016 Chaste is distributed in the hope that it will be useful, but WITHOUT
00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
00019 License for more details. The offer of Chaste under the terms of the
00020 License is subject to the License being interpreted in accordance with
00021 English Law and subject to any action against the University of Oxford
00022 being under the jurisdiction of the English Courts.
00023 
00024 You should have received a copy of the GNU Lesser General Public License
00025 along with Chaste. If not, see <http://www.gnu.org/licenses/>.
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" // Included here for archiving - see below.
00041 #include "SimpleStimulus.hpp"
00042 
00043 #include "ChasteCuboid.hpp"
00044 #include "AbstractChasteRegion.hpp"
00045 
00046 #include "DynamicCellModelLoader.hpp"
00047 
00048 /*
00049  * Even though these classes are only used in the .cpp file, they need to be
00050  * included here for serialization to work - the archiving code needs to see
00051  * the CHASTE_CLASS_EXPORT incantations.
00052  */
00053 #include "BackwardEulerFoxModel2002Modified.hpp"
00054 #include "LuoRudyIModel1991OdeSystem.hpp"
00055 #include "BackwardEulerLuoRudyIModel1991.hpp"
00056 #include "FoxModel2002Modified.hpp"
00057 #include "FaberRudy2000Version3.hpp"
00058 #include "FaberRudy2000Version3Optimised.hpp"
00059 #include "DiFrancescoNoble1985OdeSystem.hpp"
00060 #include "Mahajan2008OdeSystem.hpp"
00061 #include "TenTusscher2006OdeSystem.hpp"
00062 #include "HodgkinHuxleySquidAxon1952OriginalOdeSystem.hpp"
00063 #include "Maleckar2009OdeSystem.hpp"
00064 
00065 
00073 template<unsigned SPACE_DIM>
00074 class HeartConfigRelatedCellFactory : public AbstractCardiacCellFactory<SPACE_DIM>
00075 {
00076 private:
00078     cp::ionic_model_selection_type mDefaultIonicModel;
00080     std::vector<ChasteCuboid<SPACE_DIM> > mIonicModelRegions;
00082     std::vector<cp::ionic_model_selection_type> mIonicModelsDefined;
00083 
00085     std::vector<ChasteCuboid<SPACE_DIM> > mStimulatedAreas;
00087     std::vector<boost::shared_ptr<SimpleStimulus> > mStimuliApplied;
00088 
00100     std::vector<AbstractChasteRegion<SPACE_DIM>* > mCellHeterogeneityAreas;
00102     std::vector<double> mScaleFactorGks;
00104     std::vector<double> mScaleFactorIto;
00106     std::vector<double> mScaleFactorGkr;
00107 
00114     void PreconvertCellmlFiles();
00115 
00121     DynamicCellModelLoader* LoadDynamicModel(const cp::ionic_model_selection_type& rModel,
00122                                              bool isCollective);
00123 
00124 public:
00130     HeartConfigRelatedCellFactory();
00131 
00133     ~HeartConfigRelatedCellFactory();
00134 
00140     AbstractCardiacCell* CreateCellWithIntracellularStimulus(
00141             boost::shared_ptr<AbstractStimulusFunction> intracellularStimulus,
00142             unsigned nodeIndex);
00143 
00151     AbstractCardiacCell* CreateCardiacCellForTissueNode(unsigned nodeIndex);
00152 
00156     void FillInCellularTransmuralAreas();
00157 
00158 };
00159 
00160 
00161 #endif /*HEARTCONFIGRELATEDCELLFACTORY_HPP_*/

Generated by  doxygen 1.6.2