Use int as global index type in IndexSet

That is what seems to be used by ECL schedule, too.
This commit is contained in:
Markus Blatt 2020-12-14 16:19:48 +01:00
parent 4dff6fb168
commit 53b51eeba7
2 changed files with 4 additions and 2 deletions

View File

@ -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]);

View File

@ -48,8 +48,8 @@ class CommunicateAboveBelow
using Communication = Dune::CollectiveCommunication<MPIComm>;
#endif
using LocalIndex = Dune::ParallelLocalIndex<Attribute>;
using IndexSet = Dune::ParallelIndexSet<int,LocalIndex,50>;
#if HAVE_MPI
using IndexSet = Dune::ParallelIndexSet<std::size_t,LocalIndex,50>;
using RI = Dune::RemoteIndices<IndexSet>;
#endif
@ -189,6 +189,7 @@ public:
using Communication = Dune::CollectiveCommunication<MPIComm>;
#endif
static constexpr int INVALID_ECL_INDEX = -1;
/// \brief Constructs object using MPI_COMM_SELF
ParallelWellInfo(const std::string& name = {""},