36 #include "AbstractCardiacCellFactory.hpp"
37 #include "FakeBathCell.hpp"
38 #include "AbstractCvodeCell.hpp"
39 #include "HeartConfig.hpp"
41 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
47 return new FakeBathCell(this->mpSolver, this->mpZeroStimulus);
53 if (dynamic_cast<AbstractCvodeCell*>(p_cell))
55 #if CHASTE_SUNDIALS_VERSION >= 20400
60 #endif // SUNDIALS_VERSION
64 #endif // CHASTE_CVODE
69 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
71 std::vector< AbstractCardiacCellInterface* >* pCellsDistributed,
77 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
83 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
86 assert(mpMesh != NULL);
87 return mpMesh->GetNumNodes();
90 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
92 boost::shared_ptr<AbstractIvpOdeSolver> pSolver)
94 mpHeartGeometryInformation(NULL),
100 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
105 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
111 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
116 EXCEPTION(
"The mesh object has not been set in the cell factory");
121 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
124 mpHeartGeometryInformation = pHeartGeometryInformation;
127 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
130 if (mpHeartGeometryInformation == NULL)
132 EXCEPTION(
"HeartGeometryInformation object has not been set in the cell factory");
134 return mpHeartGeometryInformation;
virtual void FinaliseCellCreation(std::vector< AbstractCardiacCellInterface * > *pCellsDistributed, unsigned lo, unsigned hi)
virtual AbstractCardiacCellInterface * CreateCardiacCellForNode(Node< SPACE_DIM > *pNode)
AbstractCardiacCellFactory(boost::shared_ptr< AbstractIvpOdeSolver > pSolver=boost::shared_ptr< AbstractIvpOdeSolver >(new EulerIvpOdeSolver))
static bool IsRegionBath(HeartRegionType regionId)
virtual unsigned GetNumberOfCells()
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * GetMesh()
#define EXCEPTION(message)
virtual ~AbstractCardiacCellFactory()
HeartGeometryInformation< SPACE_DIM > * GetHeartGeometryInformation()
double GetPdeTimeStep() const
unsigned GetRegion() const
virtual void FillInCellularTransmuralAreas()
virtual void SetMesh(AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh)
void SetHeartGeometryInformation(HeartGeometryInformation< SPACE_DIM > *pHeartGeometryInformation)
static HeartConfig * Instance()