From cc64576a790b7b1d0a9c99d1c406b43c77953072 Mon Sep 17 00:00:00 2001 From: Lisa Julia Nebel Date: Mon, 29 Jan 2024 18:46:18 +0100 Subject: [PATCH] Change function removeSmallNonCartesianTransmissibilities_ to removeNonCartesianTransmissibilities_(bool removeAll) --- ebos/ecltransmissibility.hh | 2 +- ebos/ecltransmissibility_impl.hh | 26 +++++++++++++++----------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/ebos/ecltransmissibility.hh b/ebos/ecltransmissibility.hh index 76f6bfb3c..fe422168a 100644 --- a/ebos/ecltransmissibility.hh +++ b/ebos/ecltransmissibility.hh @@ -153,7 +153,7 @@ public: protected: void updateFromEclState_(bool global); - void removeSmallNonCartesianTransmissibilities_(); + void removeNonCartesianTransmissibilities_(bool removeAll); /// \brief Apply the Multipliers for the case PINCH(4)==TOPBOT /// diff --git a/ebos/ecltransmissibility_impl.hh b/ebos/ecltransmissibility_impl.hh index 99cb04884..f5957b7b1 100644 --- a/ebos/ecltransmissibility_impl.hh +++ b/ebos/ecltransmissibility_impl.hh @@ -175,6 +175,8 @@ update(bool global, const std::function& map, const const bool updateDiffusivity = eclState_.getSimulationConfig().isDiffusive(); const bool updateDispersivity = eclState_.getSimulationConfig().rock_config().dispersion(); + const bool disableNNC = eclState_.getSimulationConfig().useNONNC(); + if (map) extractPermeability_(map); else @@ -571,16 +573,18 @@ update(bool global, const std::function& map, const globalToLocal[cartElemIdx] = elemIdx; } - this->applyEditNncToGridTrans_(globalToLocal); - this->applyNncToGridTrans_(globalToLocal); - this->applyEditNncrToGridTrans_(globalToLocal); - - if (applyNncMultregT) { - this->applyNncMultreg_(globalToLocal); + if (!disableNNC) { + this->applyEditNncToGridTrans_(globalToLocal); + this->applyNncToGridTrans_(globalToLocal); + this->applyEditNncrToGridTrans_(globalToLocal); + if (applyNncMultregT) { + this->applyNncMultreg_(globalToLocal); + } } - // Remove very small non-neighbouring transmissibilities. - this->removeSmallNonCartesianTransmissibilities_(); + // If disableNNC == true, remove all non-neighbouring transmissibilities. + // If disableNNC == false, remove very small non-neighbouring transmissibilities. + this->removeNonCartesianTransmissibilities_(disableNNC); } template @@ -699,11 +703,12 @@ extractDispersion_() template void EclTransmissibility:: -removeSmallNonCartesianTransmissibilities_() +removeNonCartesianTransmissibilities_(bool removeAll) { const auto& cartDims = cartMapper_.cartesianDimensions(); for (auto&& trans: trans_) { - if (trans.second < transmissibilityThreshold_) { + //either remove all NNC transmissibilities or those less than the threshold (by default 1e-6 in the deck's unit system) + if (removeAll or trans.second < transmissibilityThreshold_) { const auto& id = trans.first; const auto& elements = isIdReverse(id); int gc1 = std::min(cartMapper_.cartesianIndex(elements.first), cartMapper_.cartesianIndex(elements.second)); @@ -715,7 +720,6 @@ removeSmallNonCartesianTransmissibilities_() if (gc2 - gc1 == 1 || gc2 - gc1 == cartDims[0] || gc2 - gc1 == cartDims[0]*cartDims[1] || gc2 - gc1 == 0) continue; - //remove transmissibilities less than the threshold (by default 1e-6 in the deck's unit system) trans.second = 0.0; } }