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);
63template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
65 std::vector< AbstractCardiacCellInterface* >* pCellsDistributed,
71template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
74 EXCEPTION(
"To get here you have probably asked for Epi/Mid/Endo CellularHeterogeneities in your HeartConfig "
75 "options or configuration .xml file, to use this you will need to provide a method"
76 " `FillInCellularTransmuralAreas()` in your cell factory to override this one.");
79template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
82 assert(mpMesh != NULL);
83 return mpMesh->GetNumNodes();
86template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
88 boost::shared_ptr<AbstractIvpOdeSolver> pSolver)
90 mpHeartGeometryInformation(NULL),
96template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
101template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
107template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
112 EXCEPTION(
"The mesh object has not been set in the cell factory");
117template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
120 mpHeartGeometryInformation = pHeartGeometryInformation;
123template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
126 if (mpHeartGeometryInformation == NULL)
128 EXCEPTION(
"HeartGeometryInformation object has not been set in the cell factory");
130 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