mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #5265 from akva2/janitoring
BlackoilWellModel: header cleanup and some debug-iterator fixes
This commit is contained in:
@@ -26,15 +26,11 @@
|
||||
|
||||
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include <opm/input/eclipse/Schedule/Group/Group.hpp>
|
||||
@@ -42,9 +38,14 @@
|
||||
#include <opm/input/eclipse/Schedule/Schedule.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Well/WellTestState.hpp>
|
||||
|
||||
#include <opm/models/discretization/common/baseauxiliarymodule.hh>
|
||||
|
||||
#include <opm/simulators/flow/countGlobalCells.hpp>
|
||||
#include <opm/simulators/flow/FlowBaseVanguard.hpp>
|
||||
#include <opm/simulators/flow/SubDomain.hpp>
|
||||
|
||||
#include <opm/simulators/linalg/matrixblock.hh>
|
||||
|
||||
#include <opm/simulators/wells/BlackoilWellModelGeneric.hpp>
|
||||
#include <opm/simulators/wells/BlackoilWellModelGuideRates.hpp>
|
||||
#include <opm/simulators/wells/GasLiftGroupInfo.hpp>
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <iomanip>
|
||||
#include <utility>
|
||||
|
||||
@@ -239,6 +240,10 @@ namespace Opm {
|
||||
|
||||
this->report_step_starts_ = true;
|
||||
|
||||
|
||||
this->rateConverter_ = std::make_unique<RateConverterType>
|
||||
(this->phase_usage_, std::vector<int>(this->local_num_cells_, 0));
|
||||
|
||||
{
|
||||
// WELPI scaling runs at start of report step.
|
||||
const auto enableWellPIScaling = true;
|
||||
@@ -253,8 +258,6 @@ namespace Opm {
|
||||
{
|
||||
// Create facility for calculating reservoir voidage volumes for
|
||||
// purpose of RESV controls.
|
||||
this->rateConverter_ = std::make_unique<RateConverterType>
|
||||
(this->phase_usage_, std::vector<int>(this->local_num_cells_, 0));
|
||||
this->rateConverter_->template defineState<ElementContext>(this->simulator_);
|
||||
|
||||
// Update VFP properties.
|
||||
|
||||
@@ -863,7 +863,7 @@ void WellState::communicateGroupRates(const Comm& comm)
|
||||
data[pos++] = 0;
|
||||
}
|
||||
}
|
||||
if (!data.empty()) {
|
||||
if (!data.empty() && pos != sz) {
|
||||
pos += this->alq_state.pack_data(&data[pos]);
|
||||
}
|
||||
assert(pos == sz);
|
||||
@@ -879,7 +879,7 @@ void WellState::communicateGroupRates(const Comm& comm)
|
||||
for (auto& value : rates)
|
||||
value = data[pos++];
|
||||
}
|
||||
if (!data.empty()) {
|
||||
if (!data.empty() && pos != sz) {
|
||||
pos += this->alq_state.unpack_data(&data[pos]);
|
||||
}
|
||||
assert(pos == sz);
|
||||
|
||||
Reference in New Issue
Block a user