diff --git a/opm/simulators/wells/BlackoilWellModel_impl.hpp b/opm/simulators/wells/BlackoilWellModel_impl.hpp index b9bda118b..df95c9c20 100644 --- a/opm/simulators/wells/BlackoilWellModel_impl.hpp +++ b/opm/simulators/wells/BlackoilWellModel_impl.hpp @@ -620,7 +620,8 @@ namespace Opm { int well_index = 0; for (const auto& well : wells_ecl_) { int completion_index = 0; - int completion_index_above = -1; // -1 marks no above perf available + // INVALID_ECL_INDEX marks no above perf available + int completion_index_above = ParallelWellInfo::INVALID_ECL_INDEX; well_perf_data_[well_index].clear(); well_perf_data_[well_index].reserve(well.getConnections().size()); CheckDistributedWellConnections checker(well, *local_parallel_well_info_[well_index]); diff --git a/opm/simulators/wells/ParallelWellInfo.hpp b/opm/simulators/wells/ParallelWellInfo.hpp index b7f1ccb5a..f8d0d4b22 100644 --- a/opm/simulators/wells/ParallelWellInfo.hpp +++ b/opm/simulators/wells/ParallelWellInfo.hpp @@ -48,8 +48,8 @@ class CommunicateAboveBelow using Communication = Dune::CollectiveCommunication; #endif using LocalIndex = Dune::ParallelLocalIndex; + using IndexSet = Dune::ParallelIndexSet; #if HAVE_MPI - using IndexSet = Dune::ParallelIndexSet; using RI = Dune::RemoteIndices; #endif @@ -189,6 +189,7 @@ public: using Communication = Dune::CollectiveCommunication; #endif + static constexpr int INVALID_ECL_INDEX = -1; /// \brief Constructs object using MPI_COMM_SELF ParallelWellInfo(const std::string& name = {""},