36 #include "CryptSimulation1d.hpp"
37 #include "WntConcentration.hpp"
41 bool deleteCellPopulationInDestructor,
44 deleteCellPopulationInDestructor,
65 c_vector<double, 1> daughter_coords;
71 c_vector<double, 1> random_vector;
80 random_vector(0) = 0.5*separation*random_direction;
81 c_vector<double, 1> proposed_new_parent_coords = parent_coords - random_vector;
82 c_vector<double, 1> proposed_new_daughter_coords = parent_coords + random_vector;
84 if ( (proposed_new_parent_coords(0) >= 0.0)
85 && (proposed_new_daughter_coords(0) >= 0.0))
88 parent_coords = proposed_new_parent_coords;
89 daughter_coords = proposed_new_daughter_coords;
93 proposed_new_daughter_coords = parent_coords + 2.0*random_vector;
94 while (proposed_new_daughter_coords(0) < 0.0)
97 random_vector(0) = 0.5*separation*fresh_random_direction;
98 proposed_new_daughter_coords = parent_coords + random_vector;
100 daughter_coords = proposed_new_daughter_coords;
103 assert(daughter_coords(0) >= 0.0);
104 assert(parent_coords(0) >= 0.0);
112 return daughter_coords;
MeshBasedCellPopulation< 1 > * mpStaticCastCellPopulation
unsigned GetLocationIndexUsingCell(CellPtr pCell)
bool mDeleteCellPopulationInDestructor
double GetMeinekeDivisionSeparation()
virtual ~CryptSimulation1d()
static RandomNumberGenerator * Instance()
c_vector< double, 1 > CalculateCellDivisionVector(CellPtr pParentCell)
#define CHASTE_CLASS_EXPORT(T)
CryptSimulation1d(AbstractCellPopulation< 1 > &rCellPopulation, bool deleteCellPopulationInDestructor=false, bool initialiseCells=true)
c_vector< double, SPACE_DIM > GetLocationOfCellCentre(CellPtr pCell)
#define MAKE_PTR_ARGS(TYPE, NAME, ARGS)
virtual void OutputSimulationParameters(out_stream &rParamsFile)
void AddCellPopulationBoundaryCondition(boost::shared_ptr< AbstractCellPopulationBoundaryCondition< ELEMENT_DIM, ELEMENT_DIM > > pBoundaryCondition)
void OutputSimulationParameters(out_stream &rParamsFile)
AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > & mrCellPopulation