mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-31 09:44:07 -05:00
reduce scope of variable
This commit is contained in:
1 parent
8683515149
commit
f0bece935b
1 file changed
+3
-3
@@ -128,13 +128,13 @@ GuideRateHandler<Scalar>::
|
||||
sendSlaveGroupPotentialsToMaster(const GroupState<Scalar>& group_state)
|
||||
{
|
||||
assert(this->isReservoirCouplingSlave());
|
||||
auto& rescoup_slave = this->reservoirCouplingSlave();
|
||||
const auto& slave_master_group_map = rescoup_slave.getSlaveToMasterGroupNameMap();
|
||||
std::vector<Potentials> potentials;
|
||||
if (this->comm_.rank() == 0) {
|
||||
// NOTE: Traversing a std::map is guaranteed to iterate the keys in lexical order for
|
||||
// std::string keys, so the master can from this order determine which potentials
|
||||
// correspond to which slave group.
|
||||
auto& rescoup_slave = this->reservoirCouplingSlave();
|
||||
const auto& slave_master_group_map = rescoup_slave.getSlaveToMasterGroupNameMap();
|
||||
std::vector<Potentials> potentials;
|
||||
for (const auto& item : slave_master_group_map) {
|
||||
const auto& slave_group_name = item.first;
|
||||
Potentials pot;
|
||||
|
||||
Reference in new issue
Block a user