100 const std::vector<unsigned> locationIndices,
101 boost::shared_ptr<AbstractCellProperty> pCellProliferativeType)
105 if (!locationIndices.empty())
108 if (numCells != locationIndices.size())
110 EXCEPTION(
"The size of the locationIndices vector must match the required number of output cells");
113 rCells.reserve(numCells);
116 for (
unsigned i=0; i<numCells; i++)
118 CELL_CYCLE_MODEL* p_cell_cycle_model =
new CELL_CYCLE_MODEL;
119 p_cell_cycle_model->SetDimension(DIM);
122 CellPtr p_cell(
new Cell(p_state, p_cell_cycle_model));
124 if (!pCellProliferativeType)
130 p_cell->SetCellProliferativeType(pCellProliferativeType);
134 if (!locationIndices.empty())
136 birth_time = 0.0 - locationIndices[i];
140 birth_time = 0.0 - i;
143 p_cell->SetBirthTime(birth_time);
144 rCells.push_back(p_cell);
151 boost::shared_ptr<AbstractCellProperty> pCellProliferativeType)
155 rCells.reserve(numCells);
158 for (
unsigned i=0; i<numCells; i++)
160 CELL_CYCLE_MODEL* p_cell_cycle_model =
new CELL_CYCLE_MODEL;
161 p_cell_cycle_model->SetDimension(DIM);
164 CellPtr p_cell(
new Cell(p_state, p_cell_cycle_model));
166 if (!pCellProliferativeType)
172 p_cell->SetCellProliferativeType(pCellProliferativeType);
182 p_cell->SetBirthTime(birth_time);
183 rCells.push_back(p_cell);
189 const std::vector<unsigned> locationIndices,
190 boost::shared_ptr<AbstractCellProperty> pCellProliferativeType)
192 assert(!locationIndices.empty());
194 unsigned num_cells = locationIndices.size();
197 rCells.reserve(num_cells);
200 for (
unsigned i=0; i<num_cells; i++)
202 CELL_CYCLE_MODEL* p_cell_cycle_model =
new CELL_CYCLE_MODEL;
203 p_cell_cycle_model->SetDimension(DIM);
207 CellPtr p_cell(
new Cell(p_state, p_cell_cycle_model));
209 if (!pCellProliferativeType)
215 p_cell->SetCellProliferativeType(pCellProliferativeType);
218 double birth_time = 0.0 - locationIndices[i];
219 p_cell->SetBirthTime(birth_time);
220 rCells.push_back(p_cell);