mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
adapting the change of the function findWellNode().
This commit is contained in:
parent
d06acaa4b5
commit
d38a6eb459
@ -413,13 +413,9 @@ namespace Opm {
|
||||
|
||||
for (int w = 0; w < nw; ++w) {
|
||||
const std::string well_name = wells_->name[w];
|
||||
// get the pointer to the well node in the well collection
|
||||
WellNode* well_node = well_collection_->findWellNode(std::string(wells().name[w]));
|
||||
// maybe should put this if in function findWellNode()
|
||||
if (well_node == nullptr) {
|
||||
OPM_THROW(std::runtime_error, "Could not find well " << std::string(wells().name[w]) << " in the well collection!\n");
|
||||
}
|
||||
well_efficiency_factors(w) = well_node->getAccumulativeEfficiencyFactor();
|
||||
// get the well node in the well collection
|
||||
WellNode& well_node = well_collection_->findWellNode(std::string(wells().name[w]));
|
||||
well_efficiency_factors(w) = well_node.getAccumulativeEfficiencyFactor();
|
||||
}
|
||||
|
||||
// map them to the perforation.
|
||||
|
@ -904,20 +904,16 @@ namespace Opm
|
||||
break;
|
||||
}
|
||||
|
||||
// get the pointer to the well node in the well collection
|
||||
WellNode* well_node = well_collection_->findWellNode(std::string(wells().name[w]));
|
||||
// maybe should put this if in function findWellNode()
|
||||
if (well_node == nullptr) {
|
||||
OPM_THROW(std::runtime_error, "Could not find well " << std::string(wells().name[w]) << " in the well collection!\n");
|
||||
}
|
||||
// get the well node in the well collection
|
||||
WellNode& well_node = well_collection_->findWellNode(std::string(wells().name[w]));
|
||||
|
||||
// update whehter the well is under group control or individual control
|
||||
if (well_node->groupControlIndex() >= 0 && current == well_node->groupControlIndex()) {
|
||||
if (well_node.groupControlIndex() >= 0 && current == well_node.groupControlIndex()) {
|
||||
// under group control
|
||||
well_node->setIndividualControl(false);
|
||||
well_node.setIndividualControl(false);
|
||||
} else {
|
||||
// individual control
|
||||
well_node->setIndividualControl(true);
|
||||
well_node.setIndividualControl(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -852,20 +852,16 @@ namespace Opm
|
||||
break;
|
||||
}
|
||||
|
||||
// get the pointer to the well node in the well collection
|
||||
WellNode* well_node = well_collection_->findWellNode(std::string(wells().name[w]));
|
||||
// maybe should put this if in function findWellNode()
|
||||
if (well_node == nullptr) {
|
||||
OPM_THROW(std::runtime_error, "Could not find well " << std::string(wells().name[w]) << " in the well collection!\n");
|
||||
}
|
||||
// get well node in the well collection
|
||||
WellNode& well_node = well_collection_->findWellNode(std::string(wells().name[w]));
|
||||
|
||||
// update whehter the well is under group control or individual control
|
||||
if (well_node->groupControlIndex() >= 0 && current == well_node->groupControlIndex()) {
|
||||
if (well_node.groupControlIndex() >= 0 && current == well_node.groupControlIndex()) {
|
||||
// under group control
|
||||
well_node->setIndividualControl(false);
|
||||
well_node.setIndividualControl(false);
|
||||
} else {
|
||||
// individual control
|
||||
well_node->setIndividualControl(true);
|
||||
well_node.setIndividualControl(true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1590,12 +1586,9 @@ namespace Opm
|
||||
|
||||
for (int w = 0; w < nw; ++w) {
|
||||
const std::string well_name = wells_->name[w];
|
||||
const WellNode* well_node = well_collection_->findWellNode(well_name);
|
||||
if (well_node == nullptr) {
|
||||
OPM_THROW(std::runtime_error, "Could not find well " << std::string(wells().name[w]) << " in the well collection!\n");
|
||||
}
|
||||
const WellNode& well_node = well_collection_->findWellNode(well_name);
|
||||
|
||||
well_efficiency_factors(w) = well_node->getAccumulativeEfficiencyFactor();
|
||||
well_efficiency_factors(w) = well_node.getAccumulativeEfficiencyFactor();
|
||||
}
|
||||
|
||||
// map them to the perforation.
|
||||
|
Loading…
Reference in New Issue
Block a user