@@ -2845,14 +2845,14 @@ template <
28452845
28462846 std::set<uint64_t > ret;
28472847 auto last_neighbors {get_face_neighbors_of (cell)};
2848- for (auto p : last_neighbors) {
2849- ret.insert (p. first );
2848+ for (const auto & [id, dir] : last_neighbors) {
2849+ ret.insert (id );
28502850 }
28512851
28522852 for (int i = 1 ; i < stencil_width; ++i) {
28532853 std::vector<std::pair<uint64_t , int >> new_neighbors;
2854- for (auto p : last_neighbors) {
2855- for (auto pp : get_face_neighbors_of (p.first )) {
2854+ for (const auto & p : last_neighbors) {
2855+ for (const auto pp : get_face_neighbors_of (p.first )) {
28562856 if (p.second == pp.second ) {
28572857 new_neighbors.push_back (pp);
28582858 ret.insert (pp.first );
@@ -7891,6 +7891,15 @@ template <
78917891 this ->no_load_balancing = false ;
78927892 }
78937893
7894+ // Hardcoded for now
7895+ if (this ->load_balancing_method == " HIER" ) {
7896+ add_partitioning_level (4 ); // Level 0 - Nodes
7897+ add_partitioning_option (0 , " LB_METHOD" , " HYPERGRAPH" );
7898+
7899+ add_partitioning_level (1 ); // Level 1 - Processes
7900+ add_partitioning_option (1 , " LB_METHOD" , " RCB" );
7901+ }
7902+
78947903 // reserved options that the user cannot change
78957904 this ->reserved_options .insert (" EDGE_WEIGHT_DIM" );
78967905 this ->reserved_options .insert (" NUM_GID_ENTRIES" );
@@ -11336,8 +11345,7 @@ template <
1133611345 }
1133711346
1133811347 number_of_neighbors[i] = 0 ;
11339- for (const auto & neighbor_i: dccrg_instance->neighbors_of .at (cell)) {
11340- const auto & neighbor = neighbor_i.first ;
11348+ for (const auto & neighbor: dccrg_instance->get_vlasov_neighbors (cell)) {
1134111349 if (neighbor != 0
1134211350 /* Zoltan 3.501 crashes in hierarchial
1134311351 if a cell is a neighbor to itself */
@@ -11393,8 +11401,7 @@ template <
1139311401
1139411402 number_of_neighbors[i] = 0 ;
1139511403
11396- for (const auto & neighbor_i: dccrg_instance->neighbors_of .at (cell)) {
11397- const auto & neighbor = neighbor_i.first ;
11404+ for (const auto & neighbor: dccrg_instance->get_vlasov_neighbors (cell)) {
1139811405
1139911406 if (neighbor == 0
1140011407 /* Zoltan 3.501 crashes in hierarchial
@@ -11411,7 +11418,7 @@ template <
1141111418
1141211419 // weight of edge from cell to *neighbor
1141311420 if (number_of_weights_per_edge > 0 ) {
11414- edge_weights[current_neighbor_number] = 1.0 ;
11421+ edge_weights[current_neighbor_number] = dccrg_instance-> get_communication_weight (neighbor) ;
1141511422 }
1141611423
1141711424 current_neighbor_number++;
0 commit comments