From b16837c19fc5452a95b0f576e7fbb4f41d947a8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Thu, 17 Aug 2023 12:03:50 +0200 Subject: [PATCH] Remove Unused Return Value The return value from applyNncToGridTrans_() was never used and the author confirms that this is intentional. Remove the entire return value to signal this intention. --- ebos/ecltransmissibility.hh | 7 ++----- ebos/ecltransmissibility_impl.hh | 15 ++------------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/ebos/ecltransmissibility.hh b/ebos/ecltransmissibility.hh index 6873cb1ee..bf4120f44 100644 --- a/ebos/ecltransmissibility.hh +++ b/ebos/ecltransmissibility.hh @@ -192,12 +192,9 @@ protected: * * \param cartesianToCompressed Vector containing the compressed index (or -1 for inactive * cells) as the element at the cartesian index. - * \return Two vector of NNCs (scaled by EDITNNC). The first one are the NNCs that have been applied - * and the second the NNCs not resembled by faces of the grid. NNCs specified for - * inactive cells are omitted in these vectors. + * \return Nothing. */ - std::tuple, std::vector> - applyNncToGridTrans_(const std::unordered_map& cartesianToCompressed); + void applyNncToGridTrans_(const std::unordered_map& cartesianToCompressed); /// \brief Multiplies the grid transmissibilities according to EDITNNC. void applyEditNncToGridTrans_(const std::unordered_map& globalToLocal); diff --git a/ebos/ecltransmissibility_impl.hh b/ebos/ecltransmissibility_impl.hh index 00dc754ce..c3cf79481 100644 --- a/ebos/ecltransmissibility_impl.hh +++ b/ebos/ecltransmissibility_impl.hh @@ -823,16 +823,12 @@ computeFaceProperties(const Intersection& intersection, } template -std::tuple, std::vector> +void EclTransmissibility:: applyNncToGridTrans_(const std::unordered_map& cartesianToCompressed) { // First scale NNCs with EDITNNC. - std::vector unprocessedNnc; - std::vector processedNnc; const auto& nnc_input = eclState_.getInputNNC().input(); - if (nnc_input.empty()) - return std::make_tuple(processedNnc, unprocessedNnc); for (const auto& nncEntry : nnc_input) { auto c1 = nncEntry.cell1; @@ -859,20 +855,13 @@ applyNncToGridTrans_(const std::unordered_map& cartesianToCompr } auto candidate = trans_.find(isId(low, high)); - - if (candidate == trans_.end()) - // This NNC is not resembled by the grid. Save it for later - // processing with local cell values - unprocessedNnc.push_back(nncEntry); - else { + if (candidate != trans_.end()) { // NNC is represented by the grid and might be a neighboring connection // In this case the transmissibilty is added to the value already // set or computed. candidate->second += nncEntry.trans; - processedNnc.push_back(nncEntry); } } - return std::make_tuple(processedNnc, unprocessedNnc); } template