mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
No need to loop over phases here
This commit is contained in:
parent
2f8d210896
commit
252d08f1bd
@ -1198,16 +1198,11 @@ namespace Opm
|
|||||||
setPrevSurfaceRates(WellState& well_state,
|
setPrevSurfaceRates(WellState& well_state,
|
||||||
const WellState& prev_well_state) const
|
const WellState& prev_well_state) const
|
||||||
{
|
{
|
||||||
const int np = this->number_of_phases_;
|
|
||||||
auto& ws = well_state.well(this->index_of_well_);
|
auto& ws = well_state.well(this->index_of_well_);
|
||||||
if (!this->changedToOpenThisStep()){
|
if (!this->changedToOpenThisStep()){
|
||||||
for (int p = 0; p<np; ++p){
|
ws.prev_surface_rates = prev_well_state.well(this->index_of_well_).surface_rates;
|
||||||
ws.prev_surface_rates[p] = prev_well_state.well(this->index_of_well_).surface_rates[p];
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
for (int p = 0; p<np; ++p){
|
ws.prev_surface_rates = ws.surface_rates;
|
||||||
ws.prev_surface_rates[p] = ws.surface_rates[p];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user