From da57e15271f425ec092696e61edd8dc0d75a0cef Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 20 Jun 2022 14:16:08 +0200 Subject: [PATCH] fixed: fix build with dune 2.6 --- .../linalg/MatrixMarketSpecializations.hpp | 13 ++++++++----- opm/simulators/wells/MultisegmentWell_impl.hpp | 3 ++- opm/simulators/wells/StandardWell_impl.hpp | 3 ++- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/opm/simulators/linalg/MatrixMarketSpecializations.hpp b/opm/simulators/linalg/MatrixMarketSpecializations.hpp index 4b1dbfec3..ec770b98a 100644 --- a/opm/simulators/linalg/MatrixMarketSpecializations.hpp +++ b/opm/simulators/linalg/MatrixMarketSpecializations.hpp @@ -9,6 +9,7 @@ #ifndef OPM_MATRIXMARKETSPECIALIZATIONS_HEADER_INCLUDED #define OPM_MATRIXMARKETSPECIALIZATIONS_HEADER_INCLUDED +#include #include namespace Opm @@ -43,10 +44,12 @@ namespace MatrixMarketImpl os << i << " " << j << std::endl; } }; +} // namespace MatrixMarketImpl - template - struct mm_multipliers; - +#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) +namespace MatrixMarketImpl +{ +#endif template struct mm_multipliers, A>> { @@ -55,9 +58,9 @@ namespace MatrixMarketImpl cols = j }; }; - +#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) } // namespace MatrixMarketImpl - +#endif } // namespace Dune diff --git a/opm/simulators/wells/MultisegmentWell_impl.hpp b/opm/simulators/wells/MultisegmentWell_impl.hpp index e5a3abcf9..111be856a 100644 --- a/opm/simulators/wells/MultisegmentWell_impl.hpp +++ b/opm/simulators/wells/MultisegmentWell_impl.hpp @@ -783,7 +783,8 @@ namespace Opm } // make cpr weights for well by pure avarage of reservoir weights of the perforations if(not(this->isPressureControlled(well_state))){ - auto well_weight = weights[0]*0.0; + auto well_weight = weights[0]; + well_weight = 0.0; int num_perfs = 0; for (size_t rowB = 0; rowB < this->duneB_.N(); ++rowB) { for (auto colB = this->duneB_[rowB].begin(), endB = this->duneB_[rowB].end(); colB != endB; ++colB) { diff --git a/opm/simulators/wells/StandardWell_impl.hpp b/opm/simulators/wells/StandardWell_impl.hpp index 776e8590e..8dd1c4549 100644 --- a/opm/simulators/wells/StandardWell_impl.hpp +++ b/opm/simulators/wells/StandardWell_impl.hpp @@ -2191,7 +2191,8 @@ namespace Opm // use_well_weights is a quasiimpes formulation which is not implemented in multisegment int bhp_var_index = Bhp; int nperf = 0; - auto cell_weights = weights[0]*0.0;// not need for not(use_well_weights) + auto cell_weights = weights[0];// not need for not(use_well_weights) + cell_weights = 0.0; assert(this->duneC_.M() == weights.size()); const int welldof_ind = this->duneC_.M() + this->index_of_well_; // do not assume anything about pressure controlled with use_well_weights (work fine with the assumtion also)