From 35dafb5eac3e18c235f0a95b1de08f0f12222fa3 Mon Sep 17 00:00:00 2001 From: Phil Miller Date: Thu, 9 Nov 2023 11:43:46 -0800 Subject: [PATCH] Fix HY_Features_MPI to match feature-type behavior of HY_Features from PR #665 --- src/core/HY_Features_MPI.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/HY_Features_MPI.cpp b/src/core/HY_Features_MPI.cpp index 19f3a4af71..625853da43 100644 --- a/src/core/HY_Features_MPI.cpp +++ b/src/core/HY_Features_MPI.cpp @@ -34,7 +34,7 @@ HY_Features_MPI::HY_Features_MPI( PartitionData partition_data, geojson::GeoJSON destinations = network.get_destination_ids(feat_id); //Find upstream ids origins = network.get_origination_ids(feat_id); - if(feat_type == "cat" || feat_type == "agg") + if(hy_features::identifiers::isCatchment(feat_type)) { //Find and prepare formulation auto formulation = formulations->get_formulation(feat_id); @@ -60,7 +60,7 @@ HY_Features_MPI::HY_Features_MPI( PartitionData partition_data, geojson::GeoJSON _catchments.emplace(feat_id, c); } - else if(feat_type == "nex" || feat_type == "tnx") + else if(hy_features::identifiers::isNexus(feat_type)) { //origins only contains LOCAL origin features (catchments) as read from //the geojson/partition subset. We need to make sure `origins` passed to remote nexus //contain IDS of ALL upstream features, including those in remote partitions