35 #ifndef SIMPLEBATHPROBLEMSETUP_HPP_
36 #define SIMPLEBATHPROBLEMSETUP_HPP_
44 #include "AbstractCardiacCellFactory.hpp"
45 #include "SimpleStimulus.hpp"
46 #include "LuoRudy1991.hpp"
47 #include "HeartRegionCodes.hpp"
53 template<
unsigned DIM,
class CELLTYPE=CellLuoRudy1991FromCellML>
123 template<
class MeshType>
125 double centreX,
double centreY,
double radius)
127 for (
typename MeshType::ElementIterator it = pMesh->GetElementIteratorBegin();
128 it != pMesh->GetElementIteratorEnd();
131 double x = it->CalculateCentroid()[0];
132 double y = it->CalculateCentroid()[1];
133 if ((x-centreX)*(x-centreX) + (y-centreY)*(y-centreY) > radius*radius)
138 pMesh->SetMeshHasChangedSinceLoading();
150 template<
class MeshType>
152 double centreX,
double centreY,
double radius)
155 MeshType* p_mesh =
new MeshType;
156 p_mesh->ConstructFromMeshReader(reader);
174 double centreX,
double centreY,
double radius)
AbstractCardiacCellInterface * CreateCardiacCellForTissueNode(Node< DIM > *pNode)
MeshType * Load2dMeshAndSetCircularTissue(const std::string &rMeshPath, double centreX, double centreY, double radius)
boost::shared_ptr< ZeroStimulus > mpZeroStimulus
void SetCircularTissueIn2dMesh(MeshType *pMesh, double centreX, double centreY, double radius)
BathCellFactory(double stimulusMagnitude, c_vector< double, DIM > stimulatedPoint)
boost::shared_ptr< AbstractIvpOdeSolver > mpSolver
static HeartRegionType GetValidBathId()
virtual void ConstructFromMeshReader(AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader)
unsigned GetRegion() const
c_vector< double, DIM > mStimulatedPoint
boost::shared_ptr< SimpleStimulus > mpStimulus
ChastePoint< SPACE_DIM > GetPoint() const
static bool IsRegionTissue(HeartRegionType regionId)