Merge pull request #1563 from atgeirr/add-has-method-guiderate

Add GuideRate::has() method.
This commit is contained in:
Joakim Hove 2020-03-12 12:55:44 +01:00 committed by GitHub
commit fcfed6e125
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 0 deletions

View File

@ -70,6 +70,7 @@ namespace Opm {
EclipseState() = default;
EclipseState(const Deck& deck);
virtual ~EclipseState() = default;
const IOConfig& getIOConfig() const;
IOConfig& getIOConfig();

View File

@ -81,6 +81,7 @@ public:
double get(const std::string& well, Well::GuideRateTarget target) const;
double get(const std::string& group, Group::GuideRateTarget target) const;
double get(const std::string& name, GuideRateModel::Target model_target) const;
bool has(const std::string& name) const;
private:
void well_compute(const std::string& wgname, size_t report_step, double sim_time, double oil_pot, double gas_pot, double wat_pot);

View File

@ -105,6 +105,11 @@ double GuideRate::get(const std::string& name, GuideRateModel::Target model_targ
}
}
bool GuideRate::has(const std::string& name) const
{
return this->values.count(name) > 0;
}
void GuideRate::compute(const std::string& wgname, size_t report_step, double sim_time, double oil_pot, double gas_pot, double wat_pot) {