Chaste Commit::ca8ccdedf819b6e02855bc0e8e6f50bdecbc5208
HeartConfigRelatedCellFactory.hpp
1/*
2
3Copyright (c) 2005-2024, University of Oxford.
4All rights reserved.
5
6University of Oxford means the Chancellor, Masters and Scholars of the
7University of Oxford, having an administrative office at Wellington
8Square, Oxford OX1 2JD, UK.
9
10This file is part of Chaste.
11
12Redistribution and use in source and binary forms, with or without
13modification, are permitted provided that the following conditions are met:
14 * Redistributions of source code must retain the above copyright notice,
15 this list of conditions and the following disclaimer.
16 * Redistributions in binary form must reproduce the above copyright notice,
17 this list of conditions and the following disclaimer in the documentation
18 and/or other materials provided with the distribution.
19 * Neither the name of the University of Oxford nor the names of its
20 contributors may be used to endorse or promote products derived from this
21 software without specific prior written permission.
22
23THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
29GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
32OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
34*/
35
36#ifndef HEARTCONFIGRELATEDCELLFACTORY_HPP_
37#define HEARTCONFIGRELATEDCELLFACTORY_HPP_
38
39#include <vector>
40#include <map>
41#include <boost/shared_ptr.hpp>
42
43#include "AbstractCardiacCellFactory.hpp"
44#include "HeartConfig.hpp"
45
46#include "AbstractStimulusFunction.hpp"
47#include "MultiStimulus.hpp" // Included here for archiving - see below.
48#include "SimpleStimulus.hpp"
49
50#include "ChasteCuboid.hpp"
51#include "AbstractChasteRegion.hpp"
52
53#include "DynamicCellModelLoader.hpp"
54
55/*
56 * Even though these classes are only used in the .cpp file, they need to be
57 * included here for serialization to work - the archiving code needs to see
58 * the CHASTE_CLASS_EXPORT incantations.
59 */
60#include "DiFrancescoNoble1985.hpp"
61#include "FaberRudy2000.hpp"
62#include "FaberRudy2000Opt.hpp"
63#include "FoxModel2002.hpp"
64#include "FoxModel2002BackwardEuler.hpp"
65#include "HodgkinHuxley1952.hpp"
66#include "LuoRudy1991.hpp"
67#include "LuoRudy1991BackwardEuler.hpp"
68#include "Mahajan2008.hpp"
69#include "Mahajan2008BackwardEuler.hpp"
70#include "Maleckar2008.hpp"
71#include "TenTusscher2006Epi.hpp"
72#include "TenTusscher2006EpiBackwardEuler.hpp"
73
74/*
75 * The following cell models aren't used by this class, but do exist in Chaste.
76 * So users of the source code could see issues with archiving if they aren't included.
77 */
78#include "FoxModel2002Opt.hpp"
79#include "LuoRudy1991Opt.hpp"
80#include "Mahajan2008Opt.hpp"
81#include "Maleckar2008Opt.hpp"
82#include "NobleVargheseKohlNoble1998a.hpp"
83#include "NobleVargheseKohlNoble1998aOpt.hpp"
84#include "NobleVargheseKohlNoble1998aBackwardEuler.hpp"
85#include "Shannon2004.hpp"
86#include "TenTusscher2006EpiOpt.hpp"
87
95template<unsigned SPACE_DIM>
97{
98private:
100 cp::ionic_model_selection_type mDefaultIonicModel;
102 std::vector<boost::shared_ptr<AbstractChasteRegion<SPACE_DIM> > > mIonicModelRegions;
104 std::vector<cp::ionic_model_selection_type> mIonicModelsDefined;
105
107 std::vector<boost::shared_ptr<AbstractChasteRegion<SPACE_DIM> > > mStimulatedAreas;
109 std::vector<boost::shared_ptr<AbstractStimulusFunction> > mStimuliApplied;
110
122 std::vector<boost::shared_ptr<AbstractChasteRegion<SPACE_DIM> > > mCellHeterogeneityAreas;
124 std::vector<double> mScaleFactorGks;
126 std::vector<double> mScaleFactorIto;
128 std::vector<double> mScaleFactorGkr;
129
131 std::vector<std::map<std::string, double> > mParameterSettings;
132
140
146 DynamicCellModelLoaderPtr LoadDynamicModel(const cp::ionic_model_selection_type& rModel,
147 bool isCollective);
148
149public:
156
159
166 boost::shared_ptr<AbstractStimulusFunction> intracellularStimulus,
167 unsigned nodeIndex);
168
177
182
189 void SetCellParameters(AbstractCardiacCellInterface* pCell, unsigned nodeIndex);
190
197 void SetCellIntracellularStimulus(AbstractCardiacCellInterface* pCell, unsigned nodeIndex);
198};
199
200
201#endif /*HEARTCONFIGRELATEDCELLFACTORY_HPP_*/
cp::ionic_model_selection_type mDefaultIonicModel
std::vector< cp::ionic_model_selection_type > mIonicModelsDefined
DynamicCellModelLoaderPtr LoadDynamicModel(const cp::ionic_model_selection_type &rModel, bool isCollective)
std::vector< boost::shared_ptr< AbstractChasteRegion< SPACE_DIM > > > mIonicModelRegions
std::vector< std::map< std::string, double > > mParameterSettings
AbstractCardiacCellInterface * CreateCardiacCellForTissueNode(Node< SPACE_DIM > *pNode)
void SetCellIntracellularStimulus(AbstractCardiacCellInterface *pCell, unsigned nodeIndex)
std::vector< boost::shared_ptr< AbstractChasteRegion< SPACE_DIM > > > mCellHeterogeneityAreas
AbstractCardiacCellInterface * CreateCellWithIntracellularStimulus(boost::shared_ptr< AbstractStimulusFunction > intracellularStimulus, unsigned nodeIndex)
std::vector< boost::shared_ptr< AbstractChasteRegion< SPACE_DIM > > > mStimulatedAreas
std::vector< boost::shared_ptr< AbstractStimulusFunction > > mStimuliApplied
void SetCellParameters(AbstractCardiacCellInterface *pCell, unsigned nodeIndex)
Definition Node.hpp:59