From fa83ed2fdc49e84b29fa856aac5f733f31f0849a Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Fri, 11 Dec 2020 14:25:56 +0100 Subject: [PATCH] use random access to simplify code at second occasion --- opm/simulators/wells/ParallelWellInfo.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opm/simulators/wells/ParallelWellInfo.hpp b/opm/simulators/wells/ParallelWellInfo.hpp index b1c202315..b7f1ccb5a 100644 --- a/opm/simulators/wells/ParallelWellInfo.hpp +++ b/opm/simulators/wells/ParallelWellInfo.hpp @@ -153,7 +153,7 @@ public: { return val1.first < val2; }); assert(global_pair != global_pairs.end()); assert(global_pair->first == pair.global()); - *(begin + static_cast(pair.local())) = sums[global_pair - global_pairs.begin()]; + begin[pair.local()] = sums[global_pair - global_pairs.begin()]; } #else OPM_THROW(std::logic_error, "In a sequential run the size of the communicator should be 1!");