Normalises all occurences of size_t to std::size_t
This commit is contained in:
@@ -181,25 +181,25 @@ namespace Opm
|
||||
time_t getStartTime() const;
|
||||
time_t posixStartTime() const;
|
||||
time_t posixEndTime() const;
|
||||
time_t simTime(size_t timeStep) const;
|
||||
double seconds(size_t timeStep) const;
|
||||
double stepLength(size_t timeStep) const;
|
||||
time_t simTime(std::size_t timeStep) const;
|
||||
double seconds(std::size_t timeStep) const;
|
||||
double stepLength(std::size_t timeStep) const;
|
||||
std::optional<int> exitStatus() const;
|
||||
|
||||
const TimeMap& getTimeMap() const;
|
||||
|
||||
size_t numWells() const;
|
||||
size_t numWells(size_t timestep) const;
|
||||
std::size_t numWells() const;
|
||||
std::size_t numWells(std::size_t timestep) const;
|
||||
bool hasWell(const std::string& wellName) const;
|
||||
bool hasWell(const std::string& wellName, std::size_t timeStep) const;
|
||||
|
||||
std::vector<std::string> wellNames(const std::string& pattern, size_t timeStep, const std::vector<std::string>& matching_wells = {}) const;
|
||||
std::vector<std::string> wellNames(const std::string& pattern, std::size_t timeStep, const std::vector<std::string>& matching_wells = {}) const;
|
||||
std::vector<std::string> wellNames(const std::string& pattern) const;
|
||||
std::vector<std::string> wellNames(size_t timeStep) const;
|
||||
std::vector<std::string> wellNames(std::size_t timeStep) const;
|
||||
std::vector<std::string> wellNames() const;
|
||||
|
||||
std::vector<std::string> groupNames(const std::string& pattern, size_t timeStep) const;
|
||||
std::vector<std::string> groupNames(size_t timeStep) const;
|
||||
std::vector<std::string> groupNames(const std::string& pattern, std::size_t timeStep) const;
|
||||
std::vector<std::string> groupNames(std::size_t timeStep) const;
|
||||
std::vector<std::string> groupNames(const std::string& pattern) const;
|
||||
std::vector<std::string> groupNames() const;
|
||||
/*
|
||||
@@ -211,68 +211,68 @@ namespace Opm
|
||||
3. If there are less than WELLDIMS::MAXGROUPS nullptr is used.
|
||||
4. The very last element corresponds to the FIELD group.
|
||||
*/
|
||||
std::vector<const Group*> restart_groups(size_t timeStep) const;
|
||||
std::vector<const Group*> restart_groups(std::size_t timeStep) const;
|
||||
|
||||
void updateWell(std::shared_ptr<Well> well, size_t reportStep);
|
||||
std::vector<std::string> changed_wells(size_t reportStep) const;
|
||||
const Well& getWell(const std::string& wellName, size_t timeStep) const;
|
||||
void updateWell(std::shared_ptr<Well> well, std::size_t reportStep);
|
||||
std::vector<std::string> changed_wells(std::size_t reportStep) const;
|
||||
const Well& getWell(const std::string& wellName, std::size_t timeStep) const;
|
||||
const Well& getWellatEnd(const std::string& well_name) const;
|
||||
std::vector<Well> getWells(size_t timeStep) const;
|
||||
std::vector<Well> getWells(std::size_t timeStep) const;
|
||||
std::vector<Well> getWellsatEnd() const;
|
||||
void shut_well(const std::string& well_name, std::size_t report_step);
|
||||
void stop_well(const std::string& well_name, std::size_t report_step);
|
||||
void open_well(const std::string& well_name, std::size_t report_step);
|
||||
|
||||
std::vector<const Group*> getChildGroups2(const std::string& group_name, size_t timeStep) const;
|
||||
std::vector<Well> getChildWells2(const std::string& group_name, size_t timeStep) const;
|
||||
const OilVaporizationProperties& getOilVaporizationProperties(size_t timestep) const;
|
||||
const Well::ProducerCMode& getGlobalWhistctlMmode(size_t timestep) const;
|
||||
std::vector<const Group*> getChildGroups2(const std::string& group_name, std::size_t timeStep) const;
|
||||
std::vector<Well> getChildWells2(const std::string& group_name, std::size_t timeStep) const;
|
||||
const OilVaporizationProperties& getOilVaporizationProperties(std::size_t timestep) const;
|
||||
const Well::ProducerCMode& getGlobalWhistctlMmode(std::size_t timestep) const;
|
||||
|
||||
const UDQActive& udqActive(size_t timeStep) const;
|
||||
const WellTestConfig& wtestConfig(size_t timestep) const;
|
||||
const GConSale& gConSale(size_t timestep) const;
|
||||
const GConSump& gConSump(size_t timestep) const;
|
||||
const WListManager& getWListManager(size_t timeStep) const;
|
||||
const UDQConfig& getUDQConfig(size_t timeStep) const;
|
||||
const UDQActive& udqActive(std::size_t timeStep) const;
|
||||
const WellTestConfig& wtestConfig(std::size_t timestep) const;
|
||||
const GConSale& gConSale(std::size_t timestep) const;
|
||||
const GConSump& gConSump(std::size_t timestep) const;
|
||||
const WListManager& getWListManager(std::size_t timeStep) const;
|
||||
const UDQConfig& getUDQConfig(std::size_t timeStep) const;
|
||||
const Action::Actions& actions(std::size_t timeStep) const;
|
||||
void evalAction(const SummaryState& summary_state, size_t timeStep);
|
||||
void evalAction(const SummaryState& summary_state, std::size_t timeStep);
|
||||
|
||||
const RPTConfig& report_config(std::size_t timeStep) const;
|
||||
|
||||
GTNode groupTree(std::size_t report_step) const;
|
||||
GTNode groupTree(const std::string& root_node, std::size_t report_step) const;
|
||||
size_t numGroups() const;
|
||||
size_t numGroups(size_t timeStep) const;
|
||||
std::size_t numGroups() const;
|
||||
std::size_t numGroups(std::size_t timeStep) const;
|
||||
bool hasGroup(const std::string& groupName) const;
|
||||
bool hasGroup(const std::string& groupName, std::size_t timeStep) const;
|
||||
const Group& getGroup(const std::string& groupName, size_t timeStep) const;
|
||||
const Group& getGroup(const std::string& groupName, std::size_t timeStep) const;
|
||||
|
||||
const Tuning& getTuning(size_t timeStep) const;
|
||||
const Tuning& getTuning(std::size_t timeStep) const;
|
||||
const MessageLimits& getMessageLimits() const;
|
||||
void invalidNamePattern (const std::string& namePattern, std::size_t report_step, const ParseContext& parseContext, ErrorGuard& errors, const DeckKeyword& keyword) const;
|
||||
const GuideRateConfig& guideRateConfig(size_t timeStep) const;
|
||||
const GuideRateConfig& guideRateConfig(std::size_t timeStep) const;
|
||||
|
||||
const RFTConfig& rftConfig() const;
|
||||
const Events& getEvents() const;
|
||||
const Events& getWellGroupEvents(const std::string& wellGroup) const;
|
||||
bool hasWellGroupEvent(const std::string& wellGroup, uint64_t event_mask, size_t reportStep) const;
|
||||
const Deck& getModifierDeck(size_t timeStep) const;
|
||||
bool hasWellGroupEvent(const std::string& wellGroup, uint64_t event_mask, std::size_t reportStep) const;
|
||||
const Deck& getModifierDeck(std::size_t timeStep) const;
|
||||
bool hasOilVaporizationProperties() const;
|
||||
const VFPProdTable& getVFPProdTable(int table_id, size_t timeStep) const;
|
||||
const VFPInjTable& getVFPInjTable(int table_id, size_t timeStep) const;
|
||||
std::map<int, std::shared_ptr<const VFPProdTable> > getVFPProdTables(size_t timeStep) const;
|
||||
std::map<int, std::shared_ptr<const VFPInjTable> > getVFPInjTables(size_t timeStep) const;
|
||||
const VFPProdTable& getVFPProdTable(int table_id, std::size_t timeStep) const;
|
||||
const VFPInjTable& getVFPInjTable(int table_id, std::size_t timeStep) const;
|
||||
std::map<int, std::shared_ptr<const VFPProdTable> > getVFPProdTables(std::size_t timeStep) const;
|
||||
std::map<int, std::shared_ptr<const VFPInjTable> > getVFPInjTables(std::size_t timeStep) const;
|
||||
/*
|
||||
Will remove all completions which are connected to cell which is not
|
||||
active. Will scan through all wells and all timesteps.
|
||||
*/
|
||||
void filterConnections(const ActiveGridCells& grid);
|
||||
size_t size() const;
|
||||
std::size_t size() const;
|
||||
const RestartConfig& restart() const;
|
||||
RestartConfig& restart();
|
||||
|
||||
void applyAction(size_t reportStep, const Action::ActionX& action, const Action::Result& result);
|
||||
int getNupcol(size_t reportStep) const;
|
||||
void applyAction(std::size_t reportStep, const Action::ActionX& action, const Action::Result& result);
|
||||
int getNupcol(std::size_t reportStep) const;
|
||||
|
||||
|
||||
const Network::ExtNetwork& network(std::size_t report_step) const;
|
||||
@@ -369,7 +369,7 @@ namespace Opm
|
||||
const EclipseGrid& grid,
|
||||
const FieldPropsManager& fp,
|
||||
const UnitSystem& unit_system);
|
||||
void addWell(Well well, size_t report_step);
|
||||
void addWell(Well well, std::size_t report_step);
|
||||
void addWell(const std::string& wellName,
|
||||
const std::string& group,
|
||||
int headI,
|
||||
@@ -381,7 +381,7 @@ namespace Opm
|
||||
bool automaticShutIn,
|
||||
int pvt_table,
|
||||
Well::GasInflowEquation gas_inflow,
|
||||
size_t timeStep,
|
||||
std::size_t timeStep,
|
||||
Connection::Order wellConnectionOrder,
|
||||
const UnitSystem& unit_system);
|
||||
|
||||
@@ -389,40 +389,40 @@ namespace Opm
|
||||
void updateNetwork(std::shared_ptr<Network::ExtNetwork> network, std::size_t report_step);
|
||||
|
||||
GTNode groupTree(const std::string& root_node, std::size_t report_step, std::size_t level, const std::optional<std::string>& parent_name) const;
|
||||
void updateGroup(std::shared_ptr<Group> group, size_t reportStep);
|
||||
void updateGroup(std::shared_ptr<Group> group, std::size_t reportStep);
|
||||
bool checkGroups(const ParseContext& parseContext, ErrorGuard& errors);
|
||||
void updateUDQActive( std::size_t timeStep, std::shared_ptr<UDQActive> udq );
|
||||
bool updateWellStatus( const std::string& well, size_t reportStep , Well::Status status, bool update_connections);
|
||||
void addWellToGroup( const std::string& group_name, const std::string& well_name , size_t timeStep);
|
||||
bool updateWellStatus( const std::string& well, std::size_t reportStep , Well::Status status, bool update_connections);
|
||||
void addWellToGroup( const std::string& group_name, const std::string& well_name , std::size_t timeStep);
|
||||
void iterateScheduleSection(std::shared_ptr<const Python> python, const std::string& input_path, const ParseContext& parseContext , ErrorGuard& errors, const SCHEDULESection& , const EclipseGrid& grid,
|
||||
const FieldPropsManager& fp);
|
||||
void addACTIONX(const Action::ActionX& action, std::size_t currentStep);
|
||||
void addGroupToGroup( const std::string& parent_group, const std::string& child_group, size_t timeStep);
|
||||
void addGroupToGroup( const std::string& parent_group, const Group& child_group, size_t timeStep);
|
||||
void addGroup(const std::string& groupName , size_t timeStep, const UnitSystem& unit_system);
|
||||
void addWell(const std::string& wellName, const DeckRecord& record, size_t timeStep, Connection::Order connection_order, const UnitSystem& unit_system);
|
||||
void addGroupToGroup( const std::string& parent_group, const std::string& child_group, std::size_t timeStep);
|
||||
void addGroupToGroup( const std::string& parent_group, const Group& child_group, std::size_t timeStep);
|
||||
void addGroup(const std::string& groupName , std::size_t timeStep, const UnitSystem& unit_system);
|
||||
void addWell(const std::string& wellName, const DeckRecord& record, std::size_t timeStep, Connection::Order connection_order, const UnitSystem& unit_system);
|
||||
void checkUnhandledKeywords( const SCHEDULESection& ) const;
|
||||
void checkIfAllConnectionsIsShut(size_t currentStep);
|
||||
void checkIfAllConnectionsIsShut(std::size_t currentStep);
|
||||
void updateUDQ(const DeckKeyword& keyword, std::size_t current_step);
|
||||
void handleKeyword(std::shared_ptr<const Python> python,
|
||||
const std::string& input_path,
|
||||
size_t currentStep,
|
||||
std::size_t currentStep,
|
||||
const SCHEDULESection& section,
|
||||
size_t keywordIdx,
|
||||
std::size_t keywordIdx,
|
||||
const DeckKeyword& keyword,
|
||||
const ParseContext& parseContext, ErrorGuard& errors,
|
||||
const EclipseGrid& grid,
|
||||
const FieldPropsManager& fp,
|
||||
std::vector<std::pair<const DeckKeyword*, size_t > >& rftProperties);
|
||||
void addWellGroupEvent(const std::string& wellGroup, ScheduleEvents::Events event, size_t reportStep);
|
||||
std::vector<std::pair<const DeckKeyword*, std::size_t > >& rftProperties);
|
||||
void addWellGroupEvent(const std::string& wellGroup, ScheduleEvents::Events event, std::size_t reportStep);
|
||||
|
||||
template<template<class, class> class Map, class Type, class Key>
|
||||
std::pair<std::vector<Type>, std::vector<std::pair<Key, std::vector<size_t>>>>
|
||||
std::pair<std::vector<Type>, std::vector<std::pair<Key, std::vector<std::size_t>>>>
|
||||
splitDynMap(const Map<Key, Opm::DynamicState<Type>>& map)
|
||||
{
|
||||
// we have to pack the unique ptrs separately, and use an index map
|
||||
// to allow reconstructing the appropriate structures.
|
||||
std::vector<std::pair<Key, std::vector<size_t>>> asMap;
|
||||
std::vector<std::pair<Key, std::vector<std::size_t>>> asMap;
|
||||
std::vector<Type> unique;
|
||||
for (const auto& it : map) {
|
||||
auto indices = it.second.split(unique);
|
||||
@@ -434,7 +434,7 @@ namespace Opm
|
||||
|
||||
template<template<class, class> class Map, class Type, class Key>
|
||||
void reconstructDynMap(const std::vector<Type>& unique,
|
||||
const std::vector<std::pair<Key, std::vector<size_t>>>& asMap,
|
||||
const std::vector<std::pair<Key, std::vector<std::size_t>>>& asMap,
|
||||
Map<Key, Opm::DynamicState<Type>>& result)
|
||||
{
|
||||
for (const auto& it : asMap) {
|
||||
|
||||
@@ -131,7 +131,7 @@ namespace {
|
||||
must therefor also scan the part of the deck prior to the
|
||||
SCHEDULE section to initialize valid MessageLimits object.
|
||||
*/
|
||||
for (size_t keywordIdx = 0; keywordIdx < deck.size(); ++keywordIdx) {
|
||||
for (std::size_t keywordIdx = 0; keywordIdx < deck.size(); ++keywordIdx) {
|
||||
const auto& keyword = deck.getKeyword(keywordIdx);
|
||||
if (keyword.name() == "SCHEDULE")
|
||||
break;
|
||||
@@ -260,15 +260,15 @@ namespace {
|
||||
|
||||
void Schedule::handleKeyword(std::shared_ptr<const Python> python,
|
||||
const std::string& input_path,
|
||||
size_t currentStep,
|
||||
std::size_t currentStep,
|
||||
const SCHEDULESection& section,
|
||||
size_t keywordIdx,
|
||||
std::size_t keywordIdx,
|
||||
const DeckKeyword& keyword,
|
||||
const ParseContext& parseContext,
|
||||
ErrorGuard& errors,
|
||||
const EclipseGrid& grid,
|
||||
const FieldPropsManager& fp,
|
||||
std::vector<std::pair<const DeckKeyword*, size_t > >& rftProperties) {
|
||||
std::vector<std::pair<const DeckKeyword*, std::size_t > >& rftProperties) {
|
||||
|
||||
const HandlerContext handlerContext { section, keyword, keywordIdx, currentStep, grid, fp };
|
||||
|
||||
@@ -288,8 +288,8 @@ namespace {
|
||||
|
||||
void Schedule::iterateScheduleSection(std::shared_ptr<const Opm::Python> python, const std::string& input_path, const ParseContext& parseContext , ErrorGuard& errors, const SCHEDULESection& section , const EclipseGrid& grid,
|
||||
const FieldPropsManager& fp) {
|
||||
std::vector<std::pair< const DeckKeyword* , size_t> > rftProperties;
|
||||
size_t keywordIdx = 0;
|
||||
std::vector<std::pair< const DeckKeyword* , std::size_t> > rftProperties;
|
||||
std::size_t keywordIdx = 0;
|
||||
/*
|
||||
The keywords in the skiprest_whitelist set are loaded from the
|
||||
SCHEDULE section even though the SKIPREST keyword is in action. The
|
||||
@@ -298,7 +298,7 @@ namespace {
|
||||
*/
|
||||
std::unordered_set<std::string> skiprest_whitelist = {"VFPPROD", "VFPINJ", "RPTSCHED", "RPTRST", "TUNING", "MESSAGES"};
|
||||
|
||||
size_t currentStep;
|
||||
std::size_t currentStep;
|
||||
if (this->m_timeMap.skiprest())
|
||||
currentStep = 0;
|
||||
else
|
||||
@@ -353,7 +353,7 @@ namespace {
|
||||
|
||||
for (auto rftPair = rftProperties.begin(); rftPair != rftProperties.end(); ++rftPair) {
|
||||
const DeckKeyword& keyword = *rftPair->first;
|
||||
size_t timeStep = rftPair->second;
|
||||
std::size_t timeStep = rftPair->second;
|
||||
if (keyword.name() == "WRFT")
|
||||
applyWRFT(keyword, timeStep);
|
||||
|
||||
@@ -414,7 +414,7 @@ namespace {
|
||||
this->updateWellStatus(well_name, report_step, Well::Status::STOP, true);
|
||||
}
|
||||
|
||||
void Schedule::updateWell(std::shared_ptr<Well> well, size_t reportStep) {
|
||||
void Schedule::updateWell(std::shared_ptr<Well> well, std::size_t reportStep) {
|
||||
auto& dynamic_state = this->wells_static.at(well->name());
|
||||
dynamic_state.update(reportStep, std::move(well));
|
||||
}
|
||||
@@ -424,7 +424,7 @@ namespace {
|
||||
Function is quite dangerous - because if this is called while holding a
|
||||
Well pointer that will go stale and needs to be refreshed.
|
||||
*/
|
||||
bool Schedule::updateWellStatus( const std::string& well_name, size_t reportStep , Well::Status status, bool update_connections) {
|
||||
bool Schedule::updateWellStatus( const std::string& well_name, std::size_t reportStep , Well::Status status, bool update_connections) {
|
||||
bool update = false;
|
||||
auto& dynamic_state = this->wells_static.at(well_name);
|
||||
auto well2 = std::make_shared<Well>(*dynamic_state[reportStep]);
|
||||
@@ -620,7 +620,7 @@ namespace {
|
||||
|
||||
void Schedule::addWell(const std::string& wellName,
|
||||
const DeckRecord& record,
|
||||
size_t timeStep,
|
||||
std::size_t timeStep,
|
||||
Connection::Order wellConnectionOrder,
|
||||
const UnitSystem& unit_system)
|
||||
{
|
||||
@@ -678,7 +678,7 @@ namespace {
|
||||
unit_system);
|
||||
}
|
||||
|
||||
void Schedule::addWell(Well well, size_t report_step) {
|
||||
void Schedule::addWell(Well well, std::size_t report_step) {
|
||||
const std::string wname = well.name();
|
||||
|
||||
m_events.addEvent( ScheduleEvents::NEW_WELL , report_step );
|
||||
@@ -702,7 +702,7 @@ namespace {
|
||||
bool automaticShutIn,
|
||||
int pvt_table,
|
||||
Well::GasInflowEquation gas_inflow,
|
||||
size_t timeStep,
|
||||
std::size_t timeStep,
|
||||
Connection::Order wellConnectionOrder,
|
||||
const UnitSystem& unit_system) {
|
||||
|
||||
@@ -727,11 +727,11 @@ namespace {
|
||||
}
|
||||
|
||||
|
||||
size_t Schedule::numWells() const {
|
||||
std::size_t Schedule::numWells() const {
|
||||
return wells_static.size();
|
||||
}
|
||||
|
||||
size_t Schedule::numWells(size_t timestep) const {
|
||||
std::size_t Schedule::numWells(std::size_t timestep) const {
|
||||
auto well_names = this->wellNames(timestep);
|
||||
return well_names.size();
|
||||
}
|
||||
@@ -748,7 +748,7 @@ namespace {
|
||||
return well.hasBeenDefined(timeStep);
|
||||
}
|
||||
|
||||
std::vector< const Group* > Schedule::getChildGroups2(const std::string& group_name, size_t timeStep) const {
|
||||
std::vector< const Group* > Schedule::getChildGroups2(const std::string& group_name, std::size_t timeStep) const {
|
||||
if (!hasGroup(group_name))
|
||||
throw std::invalid_argument("No such group: '" + group_name + "'");
|
||||
|
||||
@@ -764,7 +764,7 @@ namespace {
|
||||
return child_groups;
|
||||
}
|
||||
|
||||
std::vector< Well > Schedule::getChildWells2(const std::string& group_name, size_t timeStep) const {
|
||||
std::vector< Well > Schedule::getChildWells2(const std::string& group_name, std::size_t timeStep) const {
|
||||
if (!hasGroup(group_name))
|
||||
throw std::invalid_argument("No such group: '" + group_name + "'");
|
||||
|
||||
@@ -817,7 +817,7 @@ namespace {
|
||||
}
|
||||
|
||||
|
||||
std::vector<Well> Schedule::getWells(size_t timeStep) const {
|
||||
std::vector<Well> Schedule::getWells(std::size_t timeStep) const {
|
||||
std::vector<Well> wells;
|
||||
if (timeStep >= this->m_timeMap.size())
|
||||
throw std::invalid_argument("timeStep argument beyond the length of the simulation");
|
||||
@@ -838,7 +838,7 @@ namespace {
|
||||
return this->getWell(well_name, this->m_timeMap.size() - 1);
|
||||
}
|
||||
|
||||
const Well& Schedule::getWell(const std::string& wellName, size_t timeStep) const {
|
||||
const Well& Schedule::getWell(const std::string& wellName, std::size_t timeStep) const {
|
||||
if (this->wells_static.count(wellName) == 0)
|
||||
throw std::invalid_argument("No such well: " + wellName);
|
||||
|
||||
@@ -850,7 +850,7 @@ namespace {
|
||||
return *well_ptr;
|
||||
}
|
||||
|
||||
const Group& Schedule::getGroup(const std::string& groupName, size_t timeStep) const {
|
||||
const Group& Schedule::getGroup(const std::string& groupName, std::size_t timeStep) const {
|
||||
if (this->groups.count(groupName) == 0)
|
||||
throw std::invalid_argument("No such group: '" + groupName + "'");
|
||||
|
||||
@@ -862,7 +862,7 @@ namespace {
|
||||
return *group_ptr;
|
||||
}
|
||||
|
||||
void Schedule::updateGroup(std::shared_ptr<Group> group, size_t reportStep) {
|
||||
void Schedule::updateGroup(std::shared_ptr<Group> group, std::size_t reportStep) {
|
||||
auto& dynamic_state = this->groups.at(group->name());
|
||||
dynamic_state.update(reportStep, std::move(group));
|
||||
}
|
||||
@@ -882,7 +882,7 @@ namespace {
|
||||
*/
|
||||
|
||||
|
||||
std::vector<std::string> Schedule::wellNames(const std::string& pattern, size_t timeStep, const std::vector<std::string>& matching_wells) const {
|
||||
std::vector<std::string> Schedule::wellNames(const std::string& pattern, std::size_t timeStep, const std::vector<std::string>& matching_wells) const {
|
||||
if (pattern.size() == 0)
|
||||
return {};
|
||||
|
||||
@@ -943,7 +943,7 @@ namespace {
|
||||
return names;
|
||||
}
|
||||
|
||||
std::vector<std::string> Schedule::groupNames(const std::string& pattern, size_t timeStep) const {
|
||||
std::vector<std::string> Schedule::groupNames(const std::string& pattern, std::size_t timeStep) const {
|
||||
if (pattern.size() == 0)
|
||||
return {};
|
||||
|
||||
@@ -972,7 +972,7 @@ namespace {
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<std::string> Schedule::groupNames(size_t timeStep) const {
|
||||
std::vector<std::string> Schedule::groupNames(std::size_t timeStep) const {
|
||||
std::vector<std::string> names;
|
||||
for (const auto& group_pair : this->groups) {
|
||||
const auto& dynamic_state = group_pair.second;
|
||||
@@ -1029,8 +1029,8 @@ namespace {
|
||||
}
|
||||
|
||||
|
||||
void Schedule::addGroup(const std::string& groupName, size_t timeStep, const UnitSystem& unit_system) {
|
||||
const size_t gseqIndex = this->groups.size();
|
||||
void Schedule::addGroup(const std::string& groupName, std::size_t timeStep, const UnitSystem& unit_system) {
|
||||
const std::size_t gseqIndex = this->groups.size();
|
||||
|
||||
groups.insert( std::make_pair( groupName, DynamicState<std::shared_ptr<Group>>(this->m_timeMap, nullptr)));
|
||||
auto group_ptr = std::make_shared<Group>(groupName, gseqIndex, timeStep, this->getUDQConfig(timeStep).params().undefinedValue(), unit_system);
|
||||
@@ -1047,11 +1047,11 @@ namespace {
|
||||
this->addGroupToGroup("FIELD", *group_ptr, timeStep);
|
||||
}
|
||||
|
||||
size_t Schedule::numGroups() const {
|
||||
std::size_t Schedule::numGroups() const {
|
||||
return groups.size();
|
||||
}
|
||||
|
||||
size_t Schedule::numGroups(size_t timeStep) const {
|
||||
std::size_t Schedule::numGroups(std::size_t timeStep) const {
|
||||
const auto group_names = this->groupNames(timeStep);
|
||||
return group_names.size();
|
||||
}
|
||||
@@ -1070,7 +1070,7 @@ namespace {
|
||||
&& grpMap->second.at(timeStep);
|
||||
}
|
||||
|
||||
void Schedule::addGroupToGroup( const std::string& parent_group, const Group& child_group, size_t timeStep) {
|
||||
void Schedule::addGroupToGroup( const std::string& parent_group, const Group& child_group, std::size_t timeStep) {
|
||||
// Add to new parent
|
||||
auto& dynamic_state = this->groups.at(parent_group);
|
||||
auto parent_ptr = std::make_shared<Group>( *dynamic_state[timeStep] );
|
||||
@@ -1090,11 +1090,11 @@ namespace {
|
||||
}
|
||||
}
|
||||
|
||||
void Schedule::addGroupToGroup( const std::string& parent_group, const std::string& child_group, size_t timeStep) {
|
||||
void Schedule::addGroupToGroup( const std::string& parent_group, const std::string& child_group, std::size_t timeStep) {
|
||||
this->addGroupToGroup(parent_group, this->getGroup(child_group, timeStep), timeStep);
|
||||
}
|
||||
|
||||
void Schedule::addWellToGroup( const std::string& group_name, const std::string& well_name , size_t timeStep) {
|
||||
void Schedule::addWellToGroup( const std::string& group_name, const std::string& well_name , std::size_t timeStep) {
|
||||
const auto& well = this->getWell(well_name, timeStep);
|
||||
const auto old_gname = well.groupName();
|
||||
if (old_gname != group_name) {
|
||||
@@ -1117,11 +1117,11 @@ namespace {
|
||||
}
|
||||
|
||||
|
||||
const Tuning& Schedule::getTuning(size_t timeStep) const {
|
||||
const Tuning& Schedule::getTuning(std::size_t timeStep) const {
|
||||
return this->m_tuning.get( timeStep );
|
||||
}
|
||||
|
||||
const Deck& Schedule::getModifierDeck(size_t timeStep) const {
|
||||
const Deck& Schedule::getModifierDeck(std::size_t timeStep) const {
|
||||
return m_modifierDeck.iget( timeStep );
|
||||
}
|
||||
|
||||
@@ -1137,12 +1137,12 @@ namespace {
|
||||
throw std::invalid_argument("No such well og group " + wellGroup);
|
||||
}
|
||||
|
||||
void Schedule::addWellGroupEvent(const std::string& wellGroup, ScheduleEvents::Events event, size_t reportStep) {
|
||||
void Schedule::addWellGroupEvent(const std::string& wellGroup, ScheduleEvents::Events event, std::size_t reportStep) {
|
||||
auto& events = this->wellgroup_events.at(wellGroup);
|
||||
events.addEvent(event, reportStep);
|
||||
}
|
||||
|
||||
bool Schedule::hasWellGroupEvent(const std::string& wellGroup, uint64_t event_mask, size_t reportStep) const {
|
||||
bool Schedule::hasWellGroupEvent(const std::string& wellGroup, uint64_t event_mask, std::size_t reportStep) const {
|
||||
const auto& events = this->getWellGroupEvents(wellGroup);
|
||||
return events.hasEvent(event_mask, reportStep);
|
||||
}
|
||||
@@ -1151,23 +1151,23 @@ namespace {
|
||||
return this->m_events;
|
||||
}
|
||||
|
||||
const OilVaporizationProperties& Schedule::getOilVaporizationProperties(size_t timestep) const {
|
||||
const OilVaporizationProperties& Schedule::getOilVaporizationProperties(std::size_t timestep) const {
|
||||
return m_oilvaporizationproperties.get(timestep);
|
||||
}
|
||||
|
||||
const Well::ProducerCMode& Schedule::getGlobalWhistctlMmode(size_t timestep) const {
|
||||
const Well::ProducerCMode& Schedule::getGlobalWhistctlMmode(std::size_t timestep) const {
|
||||
return global_whistctl_mode.get(timestep);
|
||||
}
|
||||
|
||||
|
||||
bool Schedule::hasOilVaporizationProperties() const {
|
||||
for (size_t i = 0; i < this->m_timeMap.size(); ++i)
|
||||
for (std::size_t i = 0; i < this->m_timeMap.size(); ++i)
|
||||
if (m_oilvaporizationproperties.at( i ).defined()) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void Schedule::checkIfAllConnectionsIsShut(size_t timeStep) {
|
||||
void Schedule::checkIfAllConnectionsIsShut(std::size_t timeStep) {
|
||||
const auto& well_names = this->wellNames(timeStep);
|
||||
for (const auto& wname : well_names) {
|
||||
const auto& well = this->getWell(wname, timeStep);
|
||||
@@ -1209,7 +1209,7 @@ namespace {
|
||||
}
|
||||
}
|
||||
|
||||
const VFPProdTable& Schedule::getVFPProdTable(int table_id, size_t timeStep) const {
|
||||
const VFPProdTable& Schedule::getVFPProdTable(int table_id, std::size_t timeStep) const {
|
||||
const auto pair = vfpprod_tables.find(table_id);
|
||||
if (pair == vfpprod_tables.end())
|
||||
throw std::invalid_argument("No such table id: " + std::to_string(table_id));
|
||||
@@ -1221,7 +1221,7 @@ namespace {
|
||||
return *table_ptr;
|
||||
}
|
||||
|
||||
const VFPInjTable& Schedule::getVFPInjTable(int table_id, size_t timeStep) const {
|
||||
const VFPInjTable& Schedule::getVFPInjTable(int table_id, std::size_t timeStep) const {
|
||||
const auto pair = vfpinj_tables.find(table_id);
|
||||
if (pair == vfpinj_tables.end())
|
||||
throw std::invalid_argument("No such table id: " + std::to_string(table_id));
|
||||
@@ -1233,7 +1233,7 @@ namespace {
|
||||
return *table_ptr;
|
||||
}
|
||||
|
||||
std::map<int, std::shared_ptr<const VFPInjTable> > Schedule::getVFPInjTables(size_t timeStep) const {
|
||||
std::map<int, std::shared_ptr<const VFPInjTable> > Schedule::getVFPInjTables(std::size_t timeStep) const {
|
||||
std::map<int, std::shared_ptr<const VFPInjTable> > tables;
|
||||
for (const auto& pair : this->vfpinj_tables) {
|
||||
if (pair.second.get(timeStep)) {
|
||||
@@ -1243,7 +1243,7 @@ namespace {
|
||||
return tables;
|
||||
}
|
||||
|
||||
std::map<int, std::shared_ptr<const VFPProdTable> > Schedule::getVFPProdTables(size_t timeStep) const {
|
||||
std::map<int, std::shared_ptr<const VFPProdTable> > Schedule::getVFPProdTables(std::size_t timeStep) const {
|
||||
std::map<int, std::shared_ptr<const VFPProdTable> > tables;
|
||||
for (const auto& pair : this->vfpprod_tables) {
|
||||
if (pair.second.get(timeStep)) {
|
||||
@@ -1253,45 +1253,45 @@ namespace {
|
||||
return tables;
|
||||
}
|
||||
|
||||
const UDQActive& Schedule::udqActive(size_t timeStep) const {
|
||||
const UDQActive& Schedule::udqActive(std::size_t timeStep) const {
|
||||
return *this->udq_active[timeStep];
|
||||
}
|
||||
|
||||
void Schedule::updateUDQActive( size_t timeStep, std::shared_ptr<UDQActive> udq ) {
|
||||
void Schedule::updateUDQActive( std::size_t timeStep, std::shared_ptr<UDQActive> udq ) {
|
||||
this->udq_active.update(timeStep, udq);
|
||||
}
|
||||
|
||||
const WellTestConfig& Schedule::wtestConfig(size_t timeStep) const {
|
||||
const WellTestConfig& Schedule::wtestConfig(std::size_t timeStep) const {
|
||||
const auto& ptr = this->wtest_config.get(timeStep);
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
const GConSale& Schedule::gConSale(size_t timeStep) const {
|
||||
const GConSale& Schedule::gConSale(std::size_t timeStep) const {
|
||||
const auto& ptr = this->gconsale.get(timeStep);
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
const GConSump& Schedule::gConSump(size_t timeStep) const {
|
||||
const GConSump& Schedule::gConSump(std::size_t timeStep) const {
|
||||
const auto& ptr = this->gconsump.get(timeStep);
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
const WListManager& Schedule::getWListManager(size_t timeStep) const {
|
||||
const WListManager& Schedule::getWListManager(std::size_t timeStep) const {
|
||||
const auto& ptr = this->wlist_manager.get(timeStep);
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
const UDQConfig& Schedule::getUDQConfig(size_t timeStep) const {
|
||||
const UDQConfig& Schedule::getUDQConfig(std::size_t timeStep) const {
|
||||
const auto& ptr = this->udq_config.get(timeStep);
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
const GuideRateConfig& Schedule::guideRateConfig(size_t timeStep) const {
|
||||
const GuideRateConfig& Schedule::guideRateConfig(std::size_t timeStep) const {
|
||||
const auto& ptr = this->guide_rate_config.get(timeStep);
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
const RPTConfig& Schedule::report_config(size_t timeStep) const {
|
||||
const RPTConfig& Schedule::report_config(std::size_t timeStep) const {
|
||||
const auto& ptr = this->rpt_config.get(timeStep);
|
||||
return *ptr;
|
||||
}
|
||||
@@ -1300,20 +1300,20 @@ namespace {
|
||||
return this->exit_status;
|
||||
}
|
||||
|
||||
size_t Schedule::size() const {
|
||||
std::size_t Schedule::size() const {
|
||||
return this->m_timeMap.size();
|
||||
}
|
||||
|
||||
|
||||
double Schedule::seconds(size_t timeStep) const {
|
||||
double Schedule::seconds(std::size_t timeStep) const {
|
||||
return this->m_timeMap.seconds(timeStep);
|
||||
}
|
||||
|
||||
time_t Schedule::simTime(size_t timeStep) const {
|
||||
time_t Schedule::simTime(std::size_t timeStep) const {
|
||||
return this->m_timeMap[timeStep];
|
||||
}
|
||||
|
||||
double Schedule::stepLength(size_t timeStep) const {
|
||||
double Schedule::stepLength(std::size_t timeStep) const {
|
||||
return this->m_timeMap.getTimeStepLength(timeStep);
|
||||
}
|
||||
|
||||
@@ -1323,7 +1323,7 @@ namespace {
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
void Schedule::applyAction(size_t reportStep, const Action::ActionX& action, const Action::Result& result) {
|
||||
void Schedule::applyAction(std::size_t reportStep, const Action::ActionX& action, const Action::Result& result) {
|
||||
ParseContext parseContext;
|
||||
ErrorGuard errors;
|
||||
|
||||
@@ -1350,7 +1350,7 @@ namespace {
|
||||
return this->restart_config;
|
||||
}
|
||||
|
||||
int Schedule::getNupcol(size_t reportStep) const {
|
||||
int Schedule::getNupcol(std::size_t reportStep) const {
|
||||
return this->m_nupcol.get(reportStep);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user