59 std::map<double, CellPtr> radius_cell_map;
60 double max_distance_from_centre = 0.0;
62 cell_iter != pCellPopulation->
End();
66 radius_cell_map[distance] = *cell_iter;
68 if (distance > max_distance_from_centre)
70 max_distance_from_centre = distance;
75 std::vector<double> radius_intervals;
76 for (
unsigned i=0; i<mNumRadialBins; i++)
78 double upper_radius = max_distance_from_centre*((
double) i+1)/((
double) mNumRadialBins);
79 radius_intervals.push_back(upper_radius);
83 double lower_radius = 0.0;
84 for (
unsigned i=0; i<mNumRadialBins; i++)
87 double average_solution = 0.0;
89 for (std::map<double, CellPtr>::iterator iter = radius_cell_map.begin(); iter != radius_cell_map.end(); ++iter)
91 if (iter->first > lower_radius && iter->first <= radius_intervals[i])
93 average_solution += (iter->second)->GetCellData()->GetItem(mVariableName);
99 average_solution /= (
double) counter;
103 *this->mpOutStream << radius_intervals[i] <<
" " << average_solution <<
" ";
104 lower_radius = radius_intervals[i];
115 std::map<double, CellPtr> radius_cell_map;
116 double max_distance_from_centre = 0.0;
118 cell_iter != pCellPopulation->
End();
122 radius_cell_map[distance] = *cell_iter;
124 if (distance > max_distance_from_centre)
126 max_distance_from_centre = distance;
131 std::vector<double> radius_intervals;
132 for (
unsigned i=0; i<mNumRadialBins; i++)
134 double upper_radius = max_distance_from_centre*((
double) i+1)/((
double) mNumRadialBins);
135 radius_intervals.push_back(upper_radius);
139 double lower_radius = 0.0;
140 for (
unsigned i=0; i<mNumRadialBins; i++)
142 unsigned counter = 0;
143 double average_solution = 0.0;
145 for (std::map<double, CellPtr>::iterator iter = radius_cell_map.begin(); iter != radius_cell_map.end(); ++iter)
147 if (iter->first > lower_radius && iter->first <= radius_intervals[i])
149 average_solution += (iter->second)->GetCellData()->GetItem(mVariableName);
155 average_solution /= (
double) counter;
159 *this->mpOutStream << radius_intervals[i] <<
" " << average_solution <<
" ";
160 lower_radius = radius_intervals[i];