@@ -39,7 +39,7 @@ unsigned int debug_level = 0;
3939namespace {
4040 std ::string tsFormat = "[{:%H:%M:%S}] " ;
4141
42- using GlobalZgcMap = std ::map < std ::pair < std ::string , std ::string > , Ioss ::ZoneConnectivity > ;
42+ using GlobalZgcMap = std ::map < std ::tuple < std :: string , std ::string , std ::string > , Ioss ::ZoneConnectivity > ;
4343 using GlobalBcMap = std ::map < std ::pair < std ::string , std ::string > , Ioss ::BoundaryCondition > ;
4444 using GlobalBlockMap = std ::map < const std ::string , const Ioss ::StructuredBlock * > ;
4545 using GlobalIJKMap = std ::map < const std ::string , Ioss ::IJK_t > ;
@@ -333,7 +333,7 @@ template <typename INT> void cpup(Cpup::SystemInterface &interFace, INT /*dummy*
333333
334334 // Add ZGC to the block...
335335 for (const auto & zgc_map : global_zgc ) {
336- if (zgc_map .first . first == block_name ) {
336+ if (std :: get < 0 > ( zgc_map .first ) == block_name ) {
337337 block -> m_zoneConnectivity .push_back (zgc_map .second );
338338 }
339339 }
@@ -500,11 +500,12 @@ namespace {
500500
501501 for (const auto & zgc : block -> m_zoneConnectivity ) {
502502 if (!zgc .m_fromDecomp ) {
503- auto & gzgc = global_zgc [std ::make_pair (part_name , zgc .m_connectionName )];
503+ std ::string donor = Iocgns ::Utils ::decompose_name (zgc .m_donorName , true).first ;
504+ auto & gzgc = global_zgc [std ::make_tuple (part_name , donor , zgc .m_connectionName )];
504505 if (gzgc .m_connectionName .empty ()) {
505506 // First time this ZGC has been found. Copy from the per-proc instance and update...
506507 gzgc .m_connectionName = zgc .m_connectionName ;
507- gzgc .m_donorName = Iocgns :: Utils :: decompose_name ( zgc . m_donorName , true). first ;
508+ gzgc .m_donorName = donor ;
508509 gzgc .m_transform = zgc .m_transform ;
509510 }
510511
@@ -521,8 +522,8 @@ namespace {
521522 tmp_zgc .m_ownerRangeEnd [2 ] += own_off [2 ];
522523
523524 // Now find the donor block...
524- auto donor = Iocgns ::Utils ::decompose_name (zgc .m_donorName , true );
525- auto * donor_block = part_mesh [donor .second ]-> get_structured_block (zgc .m_donorName );
525+ auto tmp_donor = Iocgns ::Utils ::decompose_name (zgc .m_donorName , true);
526+ auto * donor_block = part_mesh [tmp_donor .second ]-> get_structured_block (zgc .m_donorName );
526527 SMART_ASSERT (donor_block != nullptr );
527528 Ioss ::IJK_t don_off = donor_block -> get_ijk_offset ();
528529
@@ -553,30 +554,33 @@ namespace {
553554 GlobalZgcMap consolidated ;
554555
555556 std ::string zone_name {};
557+ std ::string donor_name {};
556558 std ::string conn_name {};
557559 Ioss ::ZoneConnectivity zgc_test {};
558560 for (const auto & zgc : zgc_map ) {
559561 if (zone_name .empty ()) {
560- zone_name = zgc .first .first ;
561- conn_name = zgc .first .second ;
562+ zone_name = std ::get < 0 > (zgc .first );
563+ donor_name = std ::get < 1 > (zgc .first );
564+ conn_name = std ::get < 2 > (zgc .first );
562565 zgc_test = zgc .second ;
563566 continue ;
564567 }
565568
566- if (zone_name == zgc .first .first && Ioss ::Utils ::substr_equal (conn_name , zgc .first . second )) {
569+ if (zone_name == std :: get < 0 > ( zgc .first ) && donor_name == std :: get < 1 > ( zgc .first ) && Ioss ::Utils ::substr_equal (conn_name , std :: get < 2 > ( zgc .first ) )) {
567570 union_zgc_range (zgc_test , zgc .second );
568571 continue ;
569572 }
570573
571574 // If we make it to this point, then we don't have a similar zgc, so
572575 // save the one we were working on and reset to gather the next set.
573- consolidated .emplace (std ::make_pair (zone_name , conn_name ), zgc_test );
574- zone_name = zgc .first .first ;
575- conn_name = zgc .first .second ;
576+ consolidated .emplace (std ::make_tuple (zone_name , donor_name , conn_name ), zgc_test );
577+ zone_name = std ::get < 0 > (zgc .first );
578+ donor_name = std ::get < 1 > (zgc .first );
579+ conn_name = std ::get < 2 > (zgc .first );
576580 zgc_test = zgc .second ;
577581 }
578582 // Handle the last one..
579- consolidated .emplace (std ::make_pair (zone_name , conn_name ), zgc_test );
583+ consolidated .emplace (std ::make_tuple (zone_name , donor_name , conn_name ), zgc_test );
580584 return consolidated ;
581585 }
582586
0 commit comments