36 #include "Owen2011TrackingModifier.hpp" 37 #include "Owen2011OxygenBasedCellCycleModel.hpp" 38 #include "QuiescentCancerCellMutationState.hpp" 39 #include "CancerCellMutationState.hpp" 40 #include "WildTypeCellMutationState.hpp" 41 #include "PottsMesh.hpp" 43 template<
unsigned DIM>
49 template<
unsigned DIM>
54 template<
unsigned DIM>
60 template<
unsigned DIM>
70 template<
unsigned DIM>
75 rCellPopulation.Update();
78 for (
typename AbstractCellPopulation<DIM>::Iterator cell_iter = rCellPopulation.Begin();
79 cell_iter != rCellPopulation.End();
83 double this_phi = p_model->
GetPhi();
84 double this_p53 = p_model->
GetP53();
85 double this_VEGF = p_model->
GetVEGF();
88 cell_iter->GetCellData()->SetItem(
"Phi", this_phi);
89 cell_iter->GetCellData()->SetItem(
"p53", this_p53);
90 cell_iter->GetCellData()->SetItem(
"VEGF", this_VEGF);
93 unsigned number_of_normal_neighbours = 0;
94 unsigned number_of_cancerous_neighbours = 0;
96 std::set<unsigned> neighbouring_node_indices =
static_cast<PottsMesh<DIM>&
>(rCellPopulation.rGetMesh()).GetMooreNeighbouringNodeIndices(rCellPopulation.GetLocationIndexUsingCell(*cell_iter));
97 std::set<unsigned>::iterator node_it;
98 for (node_it = neighbouring_node_indices.begin(); node_it != neighbouring_node_indices.end(); node_it++)
100 if (rCellPopulation.IsCellAttachedToLocationIndex(*node_it))
102 std::set<CellPtr> neighbour_cells = rCellPopulation.GetCellsUsingLocationIndex(*node_it);
103 std::set<CellPtr>::iterator cell_neighbour_it;
104 for (cell_neighbour_it = neighbour_cells.begin(); cell_neighbour_it != neighbour_cells.end(); cell_neighbour_it++)
107 if ((*cell_neighbour_it)->GetMutationState()->template IsType<WildTypeCellMutationState>())
109 number_of_normal_neighbours++;
111 if ((*cell_neighbour_it)->GetMutationState()->template IsType<CancerCellMutationState>() ||
112 (*cell_neighbour_it)->GetMutationState()->template IsType<QuiescentCancerCellMutationState>())
114 number_of_cancerous_neighbours++;
121 cell_iter->GetCellData()->SetItem(
"Number_of_cancerous_neighbours", number_of_cancerous_neighbours);
122 cell_iter->GetCellData()->SetItem(
"Number_of_normal_neighbours", number_of_normal_neighbours);
126 template<
unsigned DIM>
139 #include "SerializationExportWrapperForCpp.hpp" virtual void SetupSolve(AbstractCellPopulation< DIM, DIM > &rCellPopulation, std::string outputDirectory)
virtual ~Owen2011TrackingModifier()
Owen2011TrackingModifier()
void OutputSimulationModifierParameters(out_stream &rParamsFile)
void UpdateCellData(AbstractCellPopulation< DIM, DIM > &rCellPopulation)
virtual void UpdateAtEndOfTimeStep(AbstractCellPopulation< DIM, DIM > &rCellPopulation)