35#ifndef SIMPLEBATHPROBLEMSETUP_HPP_
36#define SIMPLEBATHPROBLEMSETUP_HPP_
44#include "AbstractCardiacCellFactory.hpp"
45#include "DistributedTetrahedralMesh.hpp"
46#include "DistributedTetrahedralMeshPartitionType.hpp"
47#include "SimpleStimulus.hpp"
48#include "LuoRudy1991.hpp"
49#include "HeartRegionCodes.hpp"
55template<
unsigned DIM,
class CELLTYPE=CellLuoRudy1991FromCellML>
107 return new CELLTYPE(this->
mpSolver, mpStimulus);
124template<
class MeshType>
126 double centreX,
double centreY,
double radius)
128 for (
typename MeshType::ElementIterator it = pMesh->GetElementIteratorBegin();
129 it != pMesh->GetElementIteratorEnd();
132 double x = it->CalculateCentroid()[0];
133 double y = it->CalculateCentroid()[1];
134 if ((x-centreX)*(x-centreX) + (y-centreY)*(y-centreY) > radius*radius)
139 pMesh->SetMeshHasChangedSinceLoading();
151template<
class MeshType>
153 double centreX,
double centreY,
double radius)
156 MeshType* p_mesh =
new MeshType;
157 p_mesh->ConstructFromMeshReader(reader);
175 double centreX,
double centreY,
double radius)
void SetCircularTissueIn2dMesh(MeshType *pMesh, double centreX, double centreY, double radius)
MeshType * Load2dMeshAndSetCircularTissue(const std::string &rMeshPath, double centreX, double centreY, double radius)
boost::shared_ptr< AbstractIvpOdeSolver > mpSolver
boost::shared_ptr< ZeroStimulus > mpZeroStimulus
boost::shared_ptr< SimpleStimulus > mpStimulus
AbstractCardiacCellInterface * CreateCardiacCellForTissueNode(Node< DIM > *pNode)
BathCellFactory(double stimulusMagnitude, c_vector< double, DIM > stimulatedPoint)
c_vector< double, DIM > mStimulatedPoint
virtual void ConstructFromMeshReader(AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader)
static bool IsRegionTissue(HeartRegionType regionId)
static HeartRegionType GetValidBathId()
ChastePoint< SPACE_DIM > GetPoint() const
unsigned GetRegion() const