mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2776 Error bars. Moved eclipse address parsing to RifEclipseSummaryAddress class
This commit is contained in:
@@ -116,42 +116,42 @@ std::vector<std::string> RifEclipseUserDataParserTools::splitLineAndRemoveCommen
|
||||
return words;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseSummaryAddress::SummaryVarCategory RifEclipseUserDataParserTools::identifyCategory(const std::string& word)
|
||||
{
|
||||
if (word.size() == 0) return RifEclipseSummaryAddress::SUMMARY_INVALID;
|
||||
|
||||
if (!RiaStdStringTools::containsOnlyLettersAndDigits(word)) return RifEclipseSummaryAddress::SUMMARY_INVALID;
|
||||
|
||||
if (word.size() > 2 && word[0] == 'R' && word[2] == 'F')
|
||||
{
|
||||
return RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION;
|
||||
}
|
||||
|
||||
char firstLetter = word.at(0);
|
||||
|
||||
if (firstLetter == 'A') return RifEclipseSummaryAddress::SUMMARY_AQUIFER;
|
||||
if (firstLetter == 'B') return RifEclipseSummaryAddress::SUMMARY_BLOCK;
|
||||
if (firstLetter == 'C') return RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION;
|
||||
if (firstLetter == 'F') return RifEclipseSummaryAddress::SUMMARY_FIELD;
|
||||
if (firstLetter == 'G') return RifEclipseSummaryAddress::SUMMARY_WELL_GROUP;
|
||||
if (firstLetter == 'N') return RifEclipseSummaryAddress::SUMMARY_NETWORK;
|
||||
if (firstLetter == 'R') return RifEclipseSummaryAddress::SUMMARY_REGION;
|
||||
if (firstLetter == 'S') return RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT;
|
||||
if (firstLetter == 'W') return RifEclipseSummaryAddress::SUMMARY_WELL;
|
||||
|
||||
if (word.size() < 2) return RifEclipseSummaryAddress::SUMMARY_INVALID;
|
||||
|
||||
std::string firstTwoLetters = word.substr(0, 2);
|
||||
|
||||
if (firstTwoLetters == "LB") return RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR;
|
||||
if (firstTwoLetters == "LC") return RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR;
|
||||
if (firstTwoLetters == "LW") return RifEclipseSummaryAddress::SUMMARY_WELL_LGR;
|
||||
|
||||
return RifEclipseSummaryAddress::SUMMARY_INVALID;
|
||||
}
|
||||
////--------------------------------------------------------------------------------------------------
|
||||
/////
|
||||
////--------------------------------------------------------------------------------------------------
|
||||
//RifEclipseSummaryAddress::SummaryVarCategory RifEclipseUserDataParserTools::identifyCategory(const std::string& word)
|
||||
//{
|
||||
// if (word.size() == 0) return RifEclipseSummaryAddress::SUMMARY_INVALID;
|
||||
//
|
||||
// if (!RiaStdStringTools::containsOnlyLettersAndDigits(word)) return RifEclipseSummaryAddress::SUMMARY_INVALID;
|
||||
//
|
||||
// if (word.size() > 2 && word[0] == 'R' && word[2] == 'F')
|
||||
// {
|
||||
// return RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION;
|
||||
// }
|
||||
//
|
||||
// char firstLetter = word.at(0);
|
||||
//
|
||||
// if (firstLetter == 'A') return RifEclipseSummaryAddress::SUMMARY_AQUIFER;
|
||||
// if (firstLetter == 'B') return RifEclipseSummaryAddress::SUMMARY_BLOCK;
|
||||
// if (firstLetter == 'C') return RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION;
|
||||
// if (firstLetter == 'F') return RifEclipseSummaryAddress::SUMMARY_FIELD;
|
||||
// if (firstLetter == 'G') return RifEclipseSummaryAddress::SUMMARY_WELL_GROUP;
|
||||
// if (firstLetter == 'N') return RifEclipseSummaryAddress::SUMMARY_NETWORK;
|
||||
// if (firstLetter == 'R') return RifEclipseSummaryAddress::SUMMARY_REGION;
|
||||
// if (firstLetter == 'S') return RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT;
|
||||
// if (firstLetter == 'W') return RifEclipseSummaryAddress::SUMMARY_WELL;
|
||||
//
|
||||
// if (word.size() < 2) return RifEclipseSummaryAddress::SUMMARY_INVALID;
|
||||
//
|
||||
// std::string firstTwoLetters = word.substr(0, 2);
|
||||
//
|
||||
// if (firstTwoLetters == "LB") return RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR;
|
||||
// if (firstTwoLetters == "LC") return RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR;
|
||||
// if (firstTwoLetters == "LW") return RifEclipseSummaryAddress::SUMMARY_WELL_LGR;
|
||||
//
|
||||
// return RifEclipseSummaryAddress::SUMMARY_INVALID;
|
||||
//}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user