Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
HeartConfigRelatedCellFactory< SPACE_DIM > Class Template Reference

#include <HeartConfigRelatedCellFactory.hpp>

+ Inheritance diagram for HeartConfigRelatedCellFactory< SPACE_DIM >:
+ Collaboration diagram for HeartConfigRelatedCellFactory< SPACE_DIM >:

Public Member Functions

 HeartConfigRelatedCellFactory ()
 
 ~HeartConfigRelatedCellFactory ()
 
AbstractCardiacCellInterfaceCreateCellWithIntracellularStimulus (boost::shared_ptr< AbstractStimulusFunction > intracellularStimulus, unsigned nodeIndex)
 
AbstractCardiacCellInterfaceCreateCardiacCellForTissueNode (Node< SPACE_DIM > *pNode)
 
void FillInCellularTransmuralAreas ()
 
void SetCellParameters (AbstractCardiacCellInterface *pCell, unsigned nodeIndex)
 
void SetCellIntracellularStimulus (AbstractCardiacCellInterface *pCell, unsigned nodeIndex)
 
void FillInCellularTransmuralAreas ()
 
- Public Member Functions inherited from AbstractCardiacCellFactory< SPACE_DIM >
virtual AbstractCardiacCellInterfaceCreateCardiacCellForNode (Node< SPACE_DIM > *pNode)
 
virtual void FinaliseCellCreation (std::vector< AbstractCardiacCellInterface * > *pCellsDistributed, unsigned lo, unsigned hi)
 
virtual unsigned GetNumberOfCells ()
 
 AbstractCardiacCellFactory (boost::shared_ptr< AbstractIvpOdeSolver > pSolver=boost::shared_ptr< AbstractIvpOdeSolver >(new EulerIvpOdeSolver))
 
virtual ~AbstractCardiacCellFactory ()
 
virtual void SetMesh (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh)
 
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * GetMesh ()
 
void SetHeartGeometryInformation (HeartGeometryInformation< SPACE_DIM > *pHeartGeometryInformation)
 
HeartGeometryInformation< SPACE_DIM > * GetHeartGeometryInformation ()
 

Private Member Functions

void PreconvertCellmlFiles ()
 
DynamicCellModelLoaderPtr LoadDynamicModel (const cp::ionic_model_selection_type &rModel, bool isCollective)
 

Private Attributes

cp::ionic_model_selection_type mDefaultIonicModel
 
std::vector< boost::shared_ptr< AbstractChasteRegion< SPACE_DIM > > > mIonicModelRegions
 
std::vector< cp::ionic_model_selection_type > mIonicModelsDefined
 
std::vector< boost::shared_ptr< AbstractChasteRegion< SPACE_DIM > > > mStimulatedAreas
 
std::vector< boost::shared_ptr< AbstractStimulusFunction > > mStimuliApplied
 
std::vector< boost::shared_ptr< AbstractChasteRegion< SPACE_DIM > > > mCellHeterogeneityAreas
 
std::vector< doublemScaleFactorGks
 
std::vector< doublemScaleFactorIto
 
std::vector< doublemScaleFactorGkr
 
std::vector< std::map< std::string, double > > mParameterSettings
 

Additional Inherited Members

- Protected Attributes inherited from AbstractCardiacCellFactory< SPACE_DIM >
boost::shared_ptr< ZeroStimulusmpZeroStimulus
 
boost::shared_ptr< AbstractIvpOdeSolvermpSolver
 

Detailed Description

template<unsigned SPACE_DIM>
class HeartConfigRelatedCellFactory< SPACE_DIM >

This is a cardiac cell factory which uses the settings from HeartConfig to set up the cells.

It thus supports such features as heterogeneities (in both the type of cell, and for some cells, cell model parameters), and the ability to dynamically convert CellML files into C++ code, compile this, and load the resulting model.

Definition at line 96 of file HeartConfigRelatedCellFactory.hpp.

Constructor & Destructor Documentation

◆ HeartConfigRelatedCellFactory()

◆ ~HeartConfigRelatedCellFactory()

Destructor

Definition at line 106 of file HeartConfigRelatedCellFactory.cpp.

Member Function Documentation

◆ CreateCardiacCellForTissueNode()

template<unsigned SPACE_DIM>
AbstractCardiacCellInterface * HeartConfigRelatedCellFactory< SPACE_DIM >::CreateCardiacCellForTissueNode ( Node< SPACE_DIM > *  pNode)
virtual
Returns
a newly created correct stimulated tissue cell for a given region in the mesh The stimulus is determined in this method (using the list of stimulation regions). The cardiac cell type (and parameters) are determined in the CreateCellWithIntracellularStimulus method
Parameters
pNodepointer to the node.

Implements AbstractCardiacCellFactory< SPACE_DIM >.

Definition at line 334 of file HeartConfigRelatedCellFactory.cpp.

References Node< SPACE_DIM >::GetIndex(), and Node< SPACE_DIM >::GetPoint().

◆ CreateCellWithIntracellularStimulus()

template<unsigned SPACE_DIM>
AbstractCardiacCellInterface * HeartConfigRelatedCellFactory< SPACE_DIM >::CreateCellWithIntracellularStimulus ( boost::shared_ptr< AbstractStimulusFunction intracellularStimulus,
unsigned  nodeIndex 
)
Returns
a newly created correct tissue cell for a given region in the mesh
Parameters
intracellularStimulusis computed in CreateCardiacCellForTissueNode determined by the list of stimulation regions
nodeIndexis the global index within the mesh

Definition at line 111 of file HeartConfigRelatedCellFactory.cpp.

References EXCEPTION, AbstractCardiacCellInterface::GetLookupTableCollection(), HeartConfig::Instance(), and NEVER_REACHED.

◆ FillInCellularTransmuralAreas() [1/2]

void HeartConfigRelatedCellFactory< 3u >::FillInCellularTransmuralAreas ( )
virtual

Method that fills in the vector of heterogeneity areas with the NodesLists that correspond to a given layer (implemented in subclasses)

Reimplemented from AbstractCardiacCellFactory< SPACE_DIM >.

Definition at line 362 of file HeartConfigRelatedCellFactory.cpp.

References HeartConfig::GetEndoLayerFraction(), HeartConfig::GetEndoLayerIndex(), HeartConfig::GetEpiLayerFraction(), HeartConfig::GetEpiLayerIndex(), HeartConfig::GetMeshName(), HeartConfig::GetMidLayerIndex(), HeartConfig::Instance(), and NEVER_REACHED.

◆ FillInCellularTransmuralAreas() [2/2]

template<unsigned SPACE_DIM>
void HeartConfigRelatedCellFactory< SPACE_DIM >::FillInCellularTransmuralAreas ( )
virtual

Helper method to calculate and fill in the heterogeneities areas (mCellHeterogeneityAreas)

Reimplemented from AbstractCardiacCellFactory< SPACE_DIM >.

Definition at line 355 of file HeartConfigRelatedCellFactory.cpp.

References NEVER_REACHED.

◆ LoadDynamicModel()

template<unsigned SPACE_DIM>
DynamicCellModelLoaderPtr HeartConfigRelatedCellFactory< SPACE_DIM >::LoadDynamicModel ( const cp::ionic_model_selection_type &  rModel,
bool  isCollective 
)
private
Returns
a loader for the given (dynamically loadable) cell model.
Parameters
rModelmodel to load
isCollectivewhether we are being called collectively

Definition at line 95 of file HeartConfigRelatedCellFactory.cpp.

References CellMLToSharedLibraryConverter::Convert().

◆ PreconvertCellmlFiles()

template<unsigned SPACE_DIM>
void HeartConfigRelatedCellFactory< SPACE_DIM >::PreconvertCellmlFiles ( )
private

Called by the constructor to convert any CellML files used as dynamically loaded cell models to shared libraries. This is necessary since the conversion process must be done collectively.

Note
Must be called collectively.

Definition at line 79 of file HeartConfigRelatedCellFactory.cpp.

Referenced by HeartConfigRelatedCellFactory< SPACE_DIM >::HeartConfigRelatedCellFactory().

◆ SetCellIntracellularStimulus()

template<unsigned SPACE_DIM>
void HeartConfigRelatedCellFactory< SPACE_DIM >::SetCellIntracellularStimulus ( AbstractCardiacCellInterface pCell,
unsigned  nodeIndex 
)

Set the intracellular stimulus for a cell based on the definitions in HeartConfig.

Parameters
pCellthe cell to set stimulus of
nodeIndexthe index of the node corresponding to this cell in the mesh

Definition at line 316 of file HeartConfigRelatedCellFactory.cpp.

References AbstractCardiacCellInterface::SetIntracellularStimulusFunction().

Referenced by CardiacSimulation::CreateAndRun().

◆ SetCellParameters()

template<unsigned SPACE_DIM>
void HeartConfigRelatedCellFactory< SPACE_DIM >::SetCellParameters ( AbstractCardiacCellInterface pCell,
unsigned  nodeIndex 
)

Set parameters of a cell based on heterogeneity definitions in HeartConfig.

Parameters
pCellthe cell to set parameters of
nodeIndexthe index of the node corresponding to this cell in the mesh

#1166 applying Hill function for drug action

Definition at line 250 of file HeartConfigRelatedCellFactory.cpp.

References HeartConfig::GetDrugDose(), HeartConfig::GetIc50Values(), AbstractCardiacCellInterface::GetParameter(), AbstractUntemplatedParameterisedSystem::HasParameter(), HeartConfig::Instance(), and AbstractCardiacCellInterface::SetParameter().

Referenced by CardiacSimulation::CreateAndRun().

Member Data Documentation

◆ mCellHeterogeneityAreas

template<unsigned SPACE_DIM>
std::vector<boost::shared_ptr<AbstractChasteRegion<SPACE_DIM> > > HeartConfigRelatedCellFactory< SPACE_DIM >::mCellHeterogeneityAreas
private

List of regions which represent areas in which to give parametric heterogeneity (scaling gating parameters) This vector will be filled in by the HeartConfig::GetCellHeterogeneity method if the user requested to specify the heterogeneity areas by cuboids, or, alternatively, by the FillInCellularTransmuralAreas method in the cell factory called by the problem class AFTER setting the mesh (which is needed for the calculations of the distance maps for the calculations of heterogeneities).

When creating a cardiac cell for each node (CreateCardiacCellForTissueNode) the code will check whether that node is contained in the heterogeneity area or not.

Definition at line 122 of file HeartConfigRelatedCellFactory.hpp.

Referenced by HeartConfigRelatedCellFactory< SPACE_DIM >::HeartConfigRelatedCellFactory().

◆ mDefaultIonicModel

template<unsigned SPACE_DIM>
cp::ionic_model_selection_type HeartConfigRelatedCellFactory< SPACE_DIM >::mDefaultIonicModel
private

Default cardiac cell model to be used in all tissue (except heterogeneous regions)

Definition at line 100 of file HeartConfigRelatedCellFactory.hpp.

◆ mIonicModelRegions

template<unsigned SPACE_DIM>
std::vector<boost::shared_ptr<AbstractChasteRegion<SPACE_DIM> > > HeartConfigRelatedCellFactory< SPACE_DIM >::mIonicModelRegions
private

List of axis-aligned box regions which contain heterogeneous cardiac ionic model types

Definition at line 102 of file HeartConfigRelatedCellFactory.hpp.

Referenced by HeartConfigRelatedCellFactory< SPACE_DIM >::HeartConfigRelatedCellFactory().

◆ mIonicModelsDefined

template<unsigned SPACE_DIM>
std::vector<cp::ionic_model_selection_type> HeartConfigRelatedCellFactory< SPACE_DIM >::mIonicModelsDefined
private

List of ionic model (size matches that of mIonicModelRegions)

Definition at line 104 of file HeartConfigRelatedCellFactory.hpp.

Referenced by HeartConfigRelatedCellFactory< SPACE_DIM >::HeartConfigRelatedCellFactory().

◆ mParameterSettings

template<unsigned SPACE_DIM>
std::vector<std::map<std::string, double> > HeartConfigRelatedCellFactory< SPACE_DIM >::mParameterSettings
private

Named parameters to be set in each region (size of list matches that of mCellHeterogeneityAreas)

Definition at line 131 of file HeartConfigRelatedCellFactory.hpp.

Referenced by HeartConfigRelatedCellFactory< SPACE_DIM >::HeartConfigRelatedCellFactory().

◆ mScaleFactorGkr

template<unsigned SPACE_DIM>
std::vector<double> HeartConfigRelatedCellFactory< SPACE_DIM >::mScaleFactorGkr
private

List of scale factors for Gkr scaling in each region (size of list matches that of mCellHeterogeneityAreas)

Definition at line 128 of file HeartConfigRelatedCellFactory.hpp.

Referenced by HeartConfigRelatedCellFactory< SPACE_DIM >::HeartConfigRelatedCellFactory().

◆ mScaleFactorGks

template<unsigned SPACE_DIM>
std::vector<double> HeartConfigRelatedCellFactory< SPACE_DIM >::mScaleFactorGks
private

List of scale factors for Gks scaling in each region (size of list matches that of mCellHeterogeneityAreas)

Definition at line 124 of file HeartConfigRelatedCellFactory.hpp.

Referenced by HeartConfigRelatedCellFactory< SPACE_DIM >::HeartConfigRelatedCellFactory().

◆ mScaleFactorIto

template<unsigned SPACE_DIM>
std::vector<double> HeartConfigRelatedCellFactory< SPACE_DIM >::mScaleFactorIto
private

List of scale factors for Ito scaling in each region (size of list matches that of mCellHeterogeneityAreas)

Definition at line 126 of file HeartConfigRelatedCellFactory.hpp.

Referenced by HeartConfigRelatedCellFactory< SPACE_DIM >::HeartConfigRelatedCellFactory().

◆ mStimulatedAreas

template<unsigned SPACE_DIM>
std::vector<boost::shared_ptr<AbstractChasteRegion<SPACE_DIM> > > HeartConfigRelatedCellFactory< SPACE_DIM >::mStimulatedAreas
private

List of axis-aligned box or ellipsoid regions which represent areas to stimulate

Definition at line 107 of file HeartConfigRelatedCellFactory.hpp.

Referenced by HeartConfigRelatedCellFactory< SPACE_DIM >::HeartConfigRelatedCellFactory().

◆ mStimuliApplied

template<unsigned SPACE_DIM>
std::vector<boost::shared_ptr<AbstractStimulusFunction> > HeartConfigRelatedCellFactory< SPACE_DIM >::mStimuliApplied
private

List of intracellular current stimuli to apply (size matches that of mStimulatedAreas)

Definition at line 109 of file HeartConfigRelatedCellFactory.hpp.

Referenced by HeartConfigRelatedCellFactory< SPACE_DIM >::HeartConfigRelatedCellFactory().


The documentation for this class was generated from the following files: