36#include "AbstractCardiacCellFactory.hpp"
37#include "FakeBathCell.hpp"
38#include "AbstractCvodeCell.hpp"
39#include "HeartConfig.hpp"
41template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
47 return new FakeBathCell(this->mpSolver, this->mpZeroStimulus);
55#if CHASTE_SUNDIALS_VERSION >= 20400
69template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
71 std::vector< AbstractCardiacCellInterface* >* pCellsDistributed,
77template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
80 EXCEPTION(
"To get here you have probably asked for Epi/Mid/Endo CellularHeterogeneities in your HeartConfig "
81 "options or configuration .xml file, to use this you will need to provide a method"
82 " `FillInCellularTransmuralAreas()` in your cell factory to override this one.");
85template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
88 assert(mpMesh != NULL);
89 return mpMesh->GetNumNodes();
92template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
94 boost::shared_ptr<AbstractIvpOdeSolver> pSolver)
96 mpHeartGeometryInformation(NULL),
102template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
107template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
113template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
118 EXCEPTION(
"The mesh object has not been set in the cell factory");
123template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
126 mpHeartGeometryInformation = pHeartGeometryInformation;
129template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
132 if (mpHeartGeometryInformation == NULL)
134 EXCEPTION(
"HeartGeometryInformation object has not been set in the cell factory");
136 return mpHeartGeometryInformation;
#define EXCEPTION(message)
virtual AbstractCardiacCellInterface * CreateCardiacCellForNode(Node< SPACE_DIM > *pNode)
virtual void FillInCellularTransmuralAreas()
virtual void SetMesh(AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh)
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * GetMesh()
virtual void FinaliseCellCreation(std::vector< AbstractCardiacCellInterface * > *pCellsDistributed, unsigned lo, unsigned hi)
virtual ~AbstractCardiacCellFactory()
void SetHeartGeometryInformation(HeartGeometryInformation< SPACE_DIM > *pHeartGeometryInformation)
AbstractCardiacCellFactory(boost::shared_ptr< AbstractIvpOdeSolver > pSolver=boost::shared_ptr< AbstractIvpOdeSolver >(new EulerIvpOdeSolver))
virtual unsigned GetNumberOfCells()
HeartGeometryInformation< SPACE_DIM > * GetHeartGeometryInformation()
double GetPdeTimeStep() const
static HeartConfig * Instance()
static bool IsRegionBath(HeartRegionType regionId)
unsigned GetRegion() const