mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Move wellMap() and numWells() accessors
This commit is contained in:
parent
6ac9e722fc
commit
7695abfe25
@ -125,8 +125,8 @@ bool WellState::wellIsOwned(std::size_t well_index,
|
|||||||
|
|
||||||
bool WellState::wellIsOwned(const std::string& wellName) const
|
bool WellState::wellIsOwned(const std::string& wellName) const
|
||||||
{
|
{
|
||||||
const auto& it = wellMap().find( wellName );
|
const auto& it = this->wellMap_.find( wellName );
|
||||||
if (it == wellMap().end()) {
|
if (it == this->wellMap_.end()) {
|
||||||
OPM_THROW(std::logic_error, "Could not find well " << wellName << " in well map");
|
OPM_THROW(std::logic_error, "Could not find well " << wellName << " in well map");
|
||||||
}
|
}
|
||||||
const int well_index = it->second[0];
|
const int well_index = it->second[0];
|
||||||
|
@ -109,9 +109,6 @@ public:
|
|||||||
std::vector<double>& perfPress(const std::string& wname) { return perfpress_[wname]; }
|
std::vector<double>& perfPress(const std::string& wname) { return perfpress_[wname]; }
|
||||||
const std::vector<double>& perfPress(const std::string& wname) const { return perfpress_[wname]; }
|
const std::vector<double>& perfPress(const std::string& wname) const { return perfpress_[wname]; }
|
||||||
|
|
||||||
const WellMapType& wellMap() const { return wellMap_; }
|
|
||||||
WellMapType& wellMap() { return wellMap_; }
|
|
||||||
|
|
||||||
const ParallelWellInfo& parallelWellInfo(std::size_t well_index) const;
|
const ParallelWellInfo& parallelWellInfo(std::size_t well_index) const;
|
||||||
|
|
||||||
bool wellIsOwned(std::size_t well_index,
|
bool wellIsOwned(std::size_t well_index,
|
||||||
@ -119,11 +116,6 @@ public:
|
|||||||
|
|
||||||
bool wellIsOwned(const std::string& wellName) const;
|
bool wellIsOwned(const std::string& wellName) const;
|
||||||
|
|
||||||
/// The number of wells present.
|
|
||||||
int numWells() const
|
|
||||||
{
|
|
||||||
return wellMap_.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The number of phases present.
|
/// The number of phases present.
|
||||||
int numPhases() const
|
int numPhases() const
|
||||||
@ -149,6 +141,7 @@ protected:
|
|||||||
WellContainer<Well::Status> status_;
|
WellContainer<Well::Status> status_;
|
||||||
WellContainer<std::vector<PerforationData>> well_perf_data_;
|
WellContainer<std::vector<PerforationData>> well_perf_data_;
|
||||||
WellContainer<const ParallelWellInfo*> parallel_well_info_;
|
WellContainer<const ParallelWellInfo*> parallel_well_info_;
|
||||||
|
WellMapType wellMap_;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PhaseUsage phase_usage_;
|
PhaseUsage phase_usage_;
|
||||||
|
@ -63,8 +63,6 @@ public:
|
|||||||
using BaseType :: wellRates;
|
using BaseType :: wellRates;
|
||||||
using BaseType :: bhp;
|
using BaseType :: bhp;
|
||||||
using BaseType :: perfPress;
|
using BaseType :: perfPress;
|
||||||
using BaseType :: wellMap;
|
|
||||||
using BaseType :: numWells;
|
|
||||||
using BaseType :: numPhases;
|
using BaseType :: numPhases;
|
||||||
using BaseType :: resetConnectionTransFactors;
|
using BaseType :: resetConnectionTransFactors;
|
||||||
using BaseType :: updateStatus;
|
using BaseType :: updateStatus;
|
||||||
@ -74,6 +72,15 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const WellMapType& wellMap() const { return wellMap_; }
|
||||||
|
WellMapType& wellMap() { return wellMap_; }
|
||||||
|
|
||||||
|
int numWells() const
|
||||||
|
{
|
||||||
|
return wellMap_.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Allocate and initialize if wells is non-null. Also tries
|
/// Allocate and initialize if wells is non-null. Also tries
|
||||||
/// to give useful initial values to the bhp(), wellRates()
|
/// to give useful initial values to the bhp(), wellRates()
|
||||||
/// and perfPhaseRates() fields, depending on controls
|
/// and perfPhaseRates() fields, depending on controls
|
||||||
|
Loading…
Reference in New Issue
Block a user