[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);
// 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<MPIComm>;
#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();