mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #1626 from GitPaean/fixing_different_number_of_wells_due_to_wtest
fixing different well number between Wells and Well_containers
This commit is contained in:
@@ -712,7 +712,6 @@ namespace Opm {
|
|||||||
BlackoilWellModel<TypeTag>::
|
BlackoilWellModel<TypeTag>::
|
||||||
solveWellEq(const double dt)
|
solveWellEq(const double dt)
|
||||||
{
|
{
|
||||||
const int nw = numWells();
|
|
||||||
WellState well_state0 = well_state_;
|
WellState well_state0 = well_state_;
|
||||||
|
|
||||||
const int numComp = numComponents();
|
const int numComp = numComponents();
|
||||||
@@ -767,9 +766,10 @@ namespace Opm {
|
|||||||
well_state_ = well_state0;
|
well_state_ = well_state0;
|
||||||
updatePrimaryVariables();
|
updatePrimaryVariables();
|
||||||
// also recover the old well controls
|
// also recover the old well controls
|
||||||
for (int w = 0; w < nw; ++w) {
|
for (const auto& well : well_container_) {
|
||||||
WellControls* wc = well_container_[w]->wellControls();
|
const int index_of_well = well->indexOfWell();
|
||||||
well_controls_set_current(wc, well_state_.currentControls()[w]);
|
WellControls* wc = well->wellControls();
|
||||||
|
well_controls_set_current(wc, well_state_.currentControls()[index_of_well]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user