74 cell_iter != rCellPopulation.
End();
77 auto p_cell_edge_model =
static_cast<CellSrnModel*
>(cell_iter->GetSrnModel());
80 std::vector<double> notch_vec;
81 std::vector<double> delta_vec;
84 for (
unsigned i = 0 ; i < p_cell_edge_model->GetNumEdgeSrn(); i++)
86 boost::shared_ptr<DeltaNotchEdgeSrnModel> p_model
87 = boost::static_pointer_cast<DeltaNotchEdgeSrnModel>(p_cell_edge_model->GetEdgeSrn(i));
88 double edge_delta = p_model->GetDelta();
89 double edge_notch = p_model->GetNotch();
91 delta_vec.push_back(edge_delta);
92 notch_vec.push_back(edge_notch);
95 cell_iter->GetCellEdgeData()->SetItem(
"edge delta", delta_vec);
96 cell_iter->GetCellEdgeData()->SetItem(
"edge notch", notch_vec);
100 assert(p_cell_edge_model->GetInteriorSrn() !=
nullptr);
101 boost::shared_ptr<DeltaNotchInteriorSrnModel> p_interior_model
102 = boost::static_pointer_cast<DeltaNotchInteriorSrnModel>(p_cell_edge_model->GetInteriorSrn());
105 cell_iter->GetCellData()->SetItem(
"interior delta", p_interior_model->GetDelta());
106 cell_iter->GetCellData()->SetItem(
"interior notch", p_interior_model->GetNotch());
111 cell_iter != rCellPopulation.
End();
114 auto p_cell_edge_model =
static_cast<CellSrnModel*
>(cell_iter->GetSrnModel());
115 const unsigned num_cell_edges = p_cell_edge_model->
GetNumEdgeSrn();
116 std::vector<double> neigh_mean_delta(num_cell_edges);
119 double total_edge_delta = 0;
120 double total_edge_notch = 0;
122 auto edges_delta = cell_iter->GetCellEdgeData()->GetItem(
"edge delta");
123 auto edges_notch = cell_iter->GetCellEdgeData()->GetItem(
"edge notch");
125 for (
unsigned i = 0 ; i < p_cell_edge_model->GetNumEdgeSrn(); i++)
127 total_edge_delta += edges_delta[i];
128 total_edge_notch += edges_notch[i];
131 cell_iter->GetCellData()->SetItem(
"total neighbour edge delta", total_edge_delta);
132 cell_iter->GetCellData()->SetItem(
"total edge notch", total_edge_notch);
135 for (
unsigned i=0; i<num_cell_edges; ++i)
139 double mean_delta = 0;
140 for (
auto neighbourIndex: elemNeighbours)
143 std::vector<double> neighbour_delta_vec = neighbourCell->GetCellEdgeData()->GetItem(
"edge delta");
144 mean_delta += neighbour_delta_vec[neighbourIndex.second];
146 if (elemNeighbours.size() > 0)
148 mean_delta = mean_delta/elemNeighbours.size();
150 neigh_mean_delta[i] = mean_delta;
152 cell_iter->GetCellEdgeData()->SetItem(
"neighbour delta", neigh_mean_delta);