Well State: Add Predicate for Flow Rate Existence

This commit adds two new predicate member functions

    bool hasWellRates(well_name) const
    bool hasProductionGroupRates(group_name) const

that enable querying the existence of the corresponding flow rate
values for wells and group production.

This is in preparation of reporting the simulator's guiderate values
to the summary and restart files.
This commit is contained in:
Bård Skaflestad 2020-07-20 17:08:01 +02:00
parent fdba34e071
commit 3c91761999

View File

@ -379,6 +379,10 @@ namespace Opm
return it->second;
}
bool hasWellRates(const std::string& wellName) const {
return this->well_rates.find(wellName) != this->well_rates.end();
}
void setCurrentProductionGroupRates(const std::string& groupName, const std::vector<double>& rates ) {
production_group_rates[groupName] = rates;
}
@ -392,6 +396,10 @@ namespace Opm
return it->second;
}
bool hasProductionGroupRates(const std::string& groupName) const {
return this->production_group_rates.find(groupName) != this->production_group_rates.end();
}
void setCurrentProductionGroupReductionRates(const std::string& groupName, const std::vector<double>& target ) {
production_group_reduction_rates[groupName] = target;
}