Chaste Commit::f2ff7ee04e70ac9d06c57344df8d017dbb12b97b
AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM > Class Template Referenceabstract

#include <AbstractCardiacCellFactory.hpp>

+ Inheritance diagram for AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM >:
+ Collaboration diagram for AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM >:

Public Member Functions

virtual AbstractCardiacCellInterfaceCreateCardiacCellForNode (Node< SPACE_DIM > *pNode)
 
virtual AbstractCardiacCellInterfaceCreateCardiacCellForTissueNode (Node< SPACE_DIM > *pNode)=0
 
virtual void FinaliseCellCreation (std::vector< AbstractCardiacCellInterface * > *pCellsDistributed, unsigned lo, unsigned hi)
 
virtual void FillInCellularTransmuralAreas ()
 
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 ()
 

Protected Attributes

boost::shared_ptr< ZeroStimulusmpZeroStimulus
 
boost::shared_ptr< AbstractIvpOdeSolvermpSolver
 

Private Attributes

AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * mpMesh
 
HeartGeometryInformation< SPACE_DIM > * mpHeartGeometryInformation
 

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
class AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM >

A factory to ease creating cardiac cell objects for use in a mono/bidomain simulation.

The user should implement their own concrete class, in particular implementing CreateCardiacCellForTissueNode(Node*), which should return the cell corresponding to a given node. The user should also implement GetNumberOfCells() if this isn't equal to the number of nodes. FinaliseCellCreation() can be used to (eg) add stimuli to certain cells after they have been created.

This class saves the user having to create cells in parallel, that work is done by the pde instead.

Template Parameters
ELEMENT_DIMDimension of the elements.
SPACE_DIMDimension of the space. If not specified, it defaults to ELEMENT_DIM.

Definition at line 70 of file AbstractCardiacCellFactory.hpp.

Constructor & Destructor Documentation

◆ AbstractCardiacCellFactory()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM >::AbstractCardiacCellFactory ( boost::shared_ptr< AbstractIvpOdeSolver pSolver = boost::shared_ptr<AbstractIvpOdeSolver>(new EulerIvpOdeSolver))

Default constructor.

Parameters
pSolverthe ODE solver to use to simulate this cell.

Definition at line 93 of file AbstractCardiacCellFactory.cpp.

◆ ~AbstractCardiacCellFactory()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM >::~AbstractCardiacCellFactory ( )
virtual

Destructor: free solver, zero stimulus and fake bath cell.

Definition at line 103 of file AbstractCardiacCellFactory.cpp.

Member Function Documentation

◆ CreateCardiacCellForNode()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractCardiacCellInterface * AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM >::CreateCardiacCellForNode ( Node< SPACE_DIM > *  pNode)
virtual
Returns
a newly created cell object for the given node.

The default implementation checks whether the node is in the bath (in which case a pointer to a (unique) fake cell is returned) and if not, calls CreateCardiacCellForTissueNode (which must be defined by subclasses).

Parameters
pNodePointer to node object.

Definition at line 42 of file AbstractCardiacCellFactory.cpp.

References HeartConfig::GetPdeTimeStep(), Node< SPACE_DIM >::GetRegion(), HeartConfig::Instance(), and HeartRegionCode::IsRegionBath().

Referenced by AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::AbstractCardiacTissue(), and ExtendedBidomainTissue< SPACE_DIM >::ExtendedBidomainTissue().

◆ CreateCardiacCellForTissueNode()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
virtual AbstractCardiacCellInterface * AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM >::CreateCardiacCellForTissueNode ( Node< SPACE_DIM > *  pNode)
pure virtual

Must be overridden by subclasses to return a cell object for the given node.

Parameters
pNodePointer to node object.
Returns
a newly created cell object for the given tissue node.

Implemented in HeartConfigRelatedCellFactory< SPACE_DIM >, PlaneStimulusCellFactory< CELL, ELEMENT_DIM, SPACE_DIM >, and PlaneStimulusCellFactory< CELL, ELEMENT_DIM, ELEMENT_DIM >.

◆ FillInCellularTransmuralAreas()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM >::FillInCellularTransmuralAreas ( )
virtual

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

Reimplemented in HeartConfigRelatedCellFactory< SPACE_DIM >, and HeartConfigRelatedCellFactory< SPACE_DIM >.

Definition at line 78 of file AbstractCardiacCellFactory.cpp.

References EXCEPTION.

◆ FinaliseCellCreation()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM >::FinaliseCellCreation ( std::vector< AbstractCardiacCellInterface * > *  pCellsDistributed,
unsigned  lo,
unsigned  hi 
)
virtual

May be overridden by subclasses to perform any necessary work after all cells have been created.

Parameters
pCellsDistributedPointer to a vector of cardiac cell pointers.
loLowest index owned by this process.
hiHighest index owned by this process.

Definition at line 70 of file AbstractCardiacCellFactory.cpp.

Referenced by AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::AbstractCardiacTissue(), and ExtendedBidomainTissue< SPACE_DIM >::ExtendedBidomainTissue().

◆ GetHeartGeometryInformation()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
HeartGeometryInformation< SPACE_DIM > * AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM >::GetHeartGeometryInformation ( )
Returns
the HeartGeometryInformation object

Definition at line 130 of file AbstractCardiacCellFactory.cpp.

References EXCEPTION.

◆ GetMesh()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM >::GetMesh ( )

◆ GetNumberOfCells()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM >::GetNumberOfCells ( )
virtual

◆ SetHeartGeometryInformation()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM >::SetHeartGeometryInformation ( HeartGeometryInformation< SPACE_DIM > *  pHeartGeometryInformation)

Set the HeartGeometryInformation object

Parameters
pHeartGeometryInformationthe HeartGeometryInformation object that is to be set

Definition at line 124 of file AbstractCardiacCellFactory.cpp.

◆ SetMesh()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM >::SetMesh ( AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *  pMesh)
virtual
Parameters
pMeshthe mesh for which to create cardiac cells.

Reimplemented in AbstractPurkinjeCellFactory< ELEMENT_DIM, SPACE_DIM >.

Definition at line 108 of file AbstractCardiacCellFactory.cpp.

Referenced by CardiacSimulation::CreateAndRun(), and AbstractPurkinjeCellFactory< ELEMENT_DIM, SPACE_DIM >::SetMesh().

Member Data Documentation

◆ mpHeartGeometryInformation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
HeartGeometryInformation<SPACE_DIM>* AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM >::mpHeartGeometryInformation
private

A pointer to an HeartGeometryInformation information object Can be accessed via get and set methods in this class.

Definition at line 82 of file AbstractCardiacCellFactory.hpp.

◆ mpMesh

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM >::mpMesh
private

The mesh is automatically set in MonodomainProblem and BidomainProblem. This member variable should be accessed through GetMesh(), which will check if it has been set before and throw an exception otherwise.

Definition at line 76 of file AbstractCardiacCellFactory.hpp.

◆ mpSolver

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
boost::shared_ptr<AbstractIvpOdeSolver> AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM >::mpSolver
protected

The solver to give each of the cells

Definition at line 88 of file AbstractCardiacCellFactory.hpp.

Referenced by PlaneStimulusCellFactory< CELL, ELEMENT_DIM, SPACE_DIM >::CreateCardiacCellForTissueNode().

◆ mpZeroStimulus

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
boost::shared_ptr<ZeroStimulus> AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM >::mpZeroStimulus
protected

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