[bugfix] Pass references to gatherVectorOnRoot

This commit is contained in:
Markus Blatt
2020-11-30 17:08:19 +01:00
parent 562f9ffd03
commit 91e951420f

View File

@@ -264,8 +264,9 @@ namespace Opm
assert(pwinfo.communication().rank() != 0 || &dummyWell != &well); assert(pwinfo.communication().rank() != 0 || &dummyWell != &well);
// report the local connections // report the local connections
reportConnections(dummyWell, pu, itr, globalCellIdxMap); reportConnections(dummyWell, pu, itr, globalCellIdxMap);
// gather them to to well on root. // gather them to well on root.
gatherVectorsOnRoot(dummyWell.connections, well.connections, pwinfo.communication()); gatherVectorsOnRoot(dummyWell.connections, well.connections,
pwinfo.communication());
} }
} }
@@ -317,8 +318,8 @@ namespace Opm
#else #else
using Communication = Dune::CollectiveCommunication<MPIComm>; using Communication = Dune::CollectiveCommunication<MPIComm>;
#endif #endif
void gatherVectorsOnRoot(std::vector< data::Connection > from_connections, void gatherVectorsOnRoot(const std::vector< data::Connection >& from_connections,
std::vector< data::Connection > to_connections, std::vector< data::Connection >& to_connections,
const Communication& comm) const const Communication& comm) const
{ {
int size = from_connections.size(); int size = from_connections.size();