36 #include "Owen11CellPopulationGenerator.hpp" 37 #include "BaseUnits.hpp" 38 #include "CancerCellMutationState.hpp" 39 #include "StalkCellMutationState.hpp" 41 #include "DefaultCellProliferativeType.hpp" 42 #include "Owen2011OxygenBasedCellCycleModel.hpp" 43 #include "VesselNetworkCellPopulationInteractor.hpp" 44 #include "CellLabelWriter.hpp" 45 #include "CellMutationStatesWriter.hpp" 46 #include "CellProliferativePhasesCountWriter.hpp" 47 #include "CellProliferativeTypesWriter.hpp" 48 #include "CellProliferativePhasesWriter.hpp" 49 #include "CellsGenerator.hpp" 50 #include "PottsMesh.hpp" 51 #include "Exception.hpp" 52 #include "Owen11CaUpdateRule.hpp" 53 #include "Owen11CaBasedDivisionRule.hpp" 54 #include "Owen11Parameters.hpp" 55 #include "Secomb04Parameters.hpp" 56 #include "GenericParameters.hpp" 57 #include "BaseUnits.hpp" 58 #include "RandomNumberGenerator.hpp" 60 template<
unsigned DIM>
64 mpPottsMeshGenerator(),
66 mpNormalCellMutationState(),
68 mReferenceLength(
BaseUnits::Instance()->GetReferenceLengthScale()),
69 mTumourRadius(0.0*
unit::metres),
70 mCellPopulationReferenceLength(
BaseUnits::Instance()->GetReferenceLengthScale())
75 template<
unsigned DIM>
82 template<
unsigned DIM>
88 template<
unsigned DIM>
94 template<
unsigned DIM>
100 template<
unsigned DIM>
106 template<
unsigned DIM>
112 template<
unsigned DIM>
117 EXCEPTION(
"A regular grid is required to set of the cell population");
120 unsigned extents_z = 1;
146 std::vector<unsigned> location_indices;
147 for (
unsigned index=0; index < p_mesh->GetNumNodes(); index++)
149 location_indices.push_back(index);
153 std::vector<CellPtr> cells;
154 MAKE_PTR(DefaultCellProliferativeType, p_diff_type);
155 CellsGenerator<Owen2011OxygenBasedCellCycleModel, DIM> cells_generator;
191 cells_generator.GenerateBasicRandom(cells, p_mesh->GetNumNodes(), p_diff_type);
192 boost::shared_ptr<CaBasedCellPopulation<DIM> > p_cell_population =
211 boost::shared_ptr<Polygon<DIM> > circle = p_sub_domain->AddCircle(
mTumourRadius, origin);
212 for (
unsigned ind = 0; ind < p_mesh->GetNumNodes(); ind++)
226 double(
mpRegularGrid->GetExtents()[1])*dimensionless_spacing/2.0 + dimensionless_origin[0],
227 double(
mpRegularGrid->GetExtents()[2])*dimensionless_spacing/2.0 + dimensionless_origin[0],
230 for(
unsigned idx=0; idx<
mpRegularGrid->GetNumberOfPoints(); idx++)
232 units::quantity<unit::length> distance =
mpRegularGrid->GetLocationOf1dIndex(idx).GetDistance(origin);
241 units::quantity<unit::pressure> initial_oxygen_tension(30.0*unit::mmHg);
244 units::quantity<unit::concentration> initial_oxygen_concentration = initial_oxygen_tension*solubility;
246 std::list<CellPtr> cells_updated = p_cell_population->rGetCells();
247 std::list<CellPtr>::iterator it;
248 for (it = cells_updated.begin(); it != cells_updated.end(); ++it)
250 (*it)->GetCellData()->SetItem(
"Phi", 0.99*RandomNumberGenerator::Instance()->ranf());
251 (*it)->GetCellData()->SetItem(
"oxygen", initial_oxygen_concentration/
BaseUnits::Instance()->GetReferenceConcentrationScale());
252 (*it)->GetCellData()->SetItem(
"VEGF", 0.0);
253 (*it)->GetCellData()->SetItem(
"p53", 0.0);
254 (*it)->GetCellData()->SetItem(
"Number_of_cancerous_neighbours", 0.0);
255 (*it)->GetCellData()->SetItem(
"Number_of_normal_neighbours", 0.0);
268 p_cell_population->RemoveAllUpdateRules();
269 p_cell_population->AddUpdateRule(p_update_rule);
270 p_cell_population->SetCaBasedDivisionRule(p_division_rule);
272 return p_cell_population;
Owen11CellPopulationGenerator()
units::quantity< unit::length > mReferenceLength
void SetRegularGrid(boost::shared_ptr< RegularGrid< DIM > > pGrid)
boost::shared_ptr< RegularGrid< DIM > > mpRegularGrid
boost::shared_ptr< AbstractCellMutationState > mpCancerCellMutationState
void SetReferenceLengthScale(units::quantity< unit::length > lengthScale)
void SetVesselNetwork(boost::shared_ptr< VesselNetwork< DIM > > pNetwork)
boost::shared_ptr< PottsMeshGenerator< DIM > > mpPottsMeshGenerator
void PartitionNetworkOverCells(AbstractCellPopulation< DIM > &rCellPopulation, units::quantity< unit::length > cellLengthScale, double threshold=1.25e-6)
boost::shared_ptr< CaBasedCellPopulation< DIM > > Update()
static const boost::shared_ptr< ParameterInstance< unit::volumetric_solubility > > mpOxygenVolumetricSolubility
static BaseUnits * Instance()
units::quantity< unit::length > mCellPopulationReferenceLength
static boost::shared_ptr< Part< DIM > > Create()
void SetVesselNetwork(boost::shared_ptr< VesselNetwork< DIM > > pNetwork)
boost::shared_ptr< VesselNetwork< DIM > > mpVesselNetwork
static boost::shared_ptr< Owen11CellPopulationGenerator< DIM > > Create()
~Owen11CellPopulationGenerator()
units::quantity< unit::length > mTumourRadius
static const boost::shared_ptr< ParameterInstance< unit::concentration > > mpGasConcentrationAtStp
void SetTumourRadius(units::quantity< unit::length > tumourRadius)