예제 #1
0
VFPProdTable::ALQ_TYPE getALQType( const DeckItem& item) {
    if (item.defaultApplied(0)) {
        return VFPProdTable::ALQ_UNDEF;
    } else {
        const std::string& alq_string = item.getTrimmedString(0);

        if (alq_string == "GRAT") {
            return VFPProdTable::ALQ_GRAT;
        }
        else if (alq_string == "IGLR") {
            return VFPProdTable::ALQ_IGLR;
        }
        else if (alq_string == "TGLR") {
            return VFPProdTable::ALQ_TGLR;
        }
        else if (alq_string == "PUMP") {
            return VFPProdTable::ALQ_PUMP;
        }
        else if (alq_string == "COMP") {
            return VFPProdTable::ALQ_COMP;
        }
        else if (alq_string == "BEAN") {
            return VFPProdTable::ALQ_BEAN;
        }
        else if (alq_string == "") {
            return VFPProdTable::ALQ_UNDEF;
        }
        else {
            throw std::invalid_argument("Invalid ALQ_DEF string: " + alq_string);
        }

        return VFPProdTable::ALQ_INVALID;
    }
}
예제 #2
0
VFPProdTable::WFR_TYPE getWFRType( const DeckItem& item) {
    const std::string& wfr_string = item.getTrimmedString(0);
    if (wfr_string == "WOR") {
        return VFPProdTable::WFR_WOR;
    }
    else if (wfr_string == "WCT") {
        return VFPProdTable::WFR_WCT;
    }
    else if (wfr_string == "WGR") {
        return VFPProdTable::WFR_WGR;
    }
    else {
        throw std::invalid_argument("Invalid WFR string");
    }
    return VFPProdTable::WFR_INVALID;
}
예제 #3
0
static VFPProdTable::FLO_TYPE getFloType( const DeckItem& item) {
    const std::string& flo_string = item.getTrimmedString(0);
    if (flo_string == "OIL") {
        return VFPProdTable::FLO_OIL;
    }
    else if (flo_string == "LIQ") {
        return VFPProdTable::FLO_LIQ;
    }
    else if (flo_string == "GAS") {
        return VFPProdTable::FLO_GAS;
    }
    else {
        throw std::invalid_argument("Invalid RATE_TYPE string");
    }
    return VFPProdTable::FLO_INVALID;
}
예제 #4
0
VFPProdTable::GFR_TYPE getGFRType( const DeckItem& item) {
    ;
    const std::string& gfr_string = item.getTrimmedString(0);
    if (gfr_string == "GOR") {
        return VFPProdTable::GFR_GOR;
    }
    else if (gfr_string == "GLR") {
        return VFPProdTable::GFR_GLR;
    }
    else if (gfr_string == "OGR") {
        return VFPProdTable::GFR_OGR;
    }
    else {
        throw std::invalid_argument("Invalid GFR string");
    }
    return VFPProdTable::GFR_INVALID;
}