From 91e951420f3214a379d5b5d85d7ecd609ec48530 Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Mon, 30 Nov 2020 17:08:19 +0100 Subject: [PATCH] [bugfix] Pass references to gatherVectorOnRoot --- opm/simulators/wells/WellState.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/opm/simulators/wells/WellState.hpp b/opm/simulators/wells/WellState.hpp index 49ecbc644..8b6a84e4c 100644 --- a/opm/simulators/wells/WellState.hpp +++ b/opm/simulators/wells/WellState.hpp @@ -264,8 +264,9 @@ namespace Opm assert(pwinfo.communication().rank() != 0 || &dummyWell != &well); // report the local connections reportConnections(dummyWell, pu, itr, globalCellIdxMap); - // gather them to to well on root. - gatherVectorsOnRoot(dummyWell.connections, well.connections, pwinfo.communication()); + // gather them to well on root. + gatherVectorsOnRoot(dummyWell.connections, well.connections, + pwinfo.communication()); } } @@ -317,8 +318,8 @@ namespace Opm #else using Communication = Dune::CollectiveCommunication; #endif - void gatherVectorsOnRoot(std::vector< data::Connection > from_connections, - std::vector< data::Connection > to_connections, + void gatherVectorsOnRoot(const std::vector< data::Connection >& from_connections, + std::vector< data::Connection >& to_connections, const Communication& comm) const { int size = from_connections.size();