Example #1
0
File: ecl_sum.c Project: flikka/ert
bool ecl_sum_is_oil_producer( const ecl_sum_type * ecl_sum , const char * well) {
  const char * WOPT_KEY = "WOPT";
  bool oil_producer = false;

  if (ecl_sum_has_well_var( ecl_sum , well , WOPT_KEY)) {
    int last_step = ecl_sum_get_data_length( ecl_sum ) - 1;
    double wopt = ecl_sum_get_well_var( ecl_sum , last_step , well , WOPT_KEY);

    if (wopt > 0)
      oil_producer = true;
  }

  return oil_producer;
}
bool ECLSummaryReader::hasWellVar(QString well_name, QString var_name) {
    return ecl_sum_has_well_var(ecl_sum_,
                                well_name.toLatin1().constData(),
                                var_name.toLatin1().constData());
}