File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
power_grid_model_c/power_grid_model/include/power_grid_model/main_core Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -202,11 +202,11 @@ ComponentTopology construct_topology(main_model_state_c auto const& state) {
202202
203203ComponentConnections construct_components_connections (main_model_state_c auto const & state) {
204204 ComponentConnections comp_conn;
205- comp_conn.branch_connected .resize (state. comp_topo -> branch_node_idx . size ( ));
206- comp_conn.branch_phase_shift .resize (state. comp_topo -> branch_node_idx . size ( ));
207- comp_conn.branch3_connected .resize (state. comp_topo -> branch3_node_idx . size ( ));
208- comp_conn.branch3_phase_shift .resize (state. comp_topo -> branch3_node_idx . size ( ));
209- comp_conn.source_connected .resize (state. comp_topo -> source_node_idx . size ( ));
205+ comp_conn.branch_connected .resize (get_component_size<Branch>(state. components ));
206+ comp_conn.branch_phase_shift .resize (get_component_size<Branch>(state. components ));
207+ comp_conn.branch3_connected .resize (get_component_size<Branch3>(state. components ));
208+ comp_conn.branch3_phase_shift .resize (get_component_size<Branch3>(state. components ));
209+ comp_conn.source_connected .resize (get_component_size<Source>(state. components ));
210210 std::ranges::transform (
211211 state.components .template citer <Branch>(), comp_conn.branch_connected .begin (), [](Branch const & branch) {
212212 return BranchConnected{static_cast <IntS>(branch.from_status ()), static_cast <IntS>(branch.to_status ())};
You can’t perform that action at this time.
0 commit comments