#4483 Summary Plot: Data source for well segment number and completions

This commit is contained in:
Magne Sjaastad
2019-08-05 21:53:48 +02:00
parent a9ee69587d
commit ec1cf83b4e
10 changed files with 488 additions and 121 deletions

View File

@@ -581,7 +581,7 @@ std::string RifEclipseSummaryAddress::uiText() const
case SUMMARY_WELL_COMPLETION:
{
text += ":" + this->wellName();
text += ":" + formatUiTextIJK();
text += ":" + blockAsString();
}
break;
case SUMMARY_WELL_LGR:
@@ -594,7 +594,7 @@ std::string RifEclipseSummaryAddress::uiText() const
{
text += ":" + this->lgrName();
text += ":" + this->wellName();
text += ":" + formatUiTextIJK();
text += ":" + blockAsString();
}
break;
case SUMMARY_WELL_SEGMENT:
@@ -605,13 +605,13 @@ std::string RifEclipseSummaryAddress::uiText() const
break;
case SUMMARY_BLOCK:
{
text += ":" + formatUiTextIJK();
text += ":" + blockAsString();
}
break;
case SUMMARY_BLOCK_LGR:
{
text += ":" + this->lgrName();
text += ":" + formatUiTextIJK();
text += ":" + blockAsString();
}
break;
case SUMMARY_AQUIFER:
@@ -635,7 +635,7 @@ std::string RifEclipseSummaryAddress::uiText(RifEclipseSummaryAddress::SummaryId
case INPUT_REGION_2_REGION: return formatUiTextRegionToRegion();
case INPUT_WELL_NAME: return wellName();
case INPUT_WELL_GROUP_NAME: return wellGroupName();
case INPUT_CELL_IJK: return formatUiTextIJK();
case INPUT_CELL_IJK: return blockAsString();
case INPUT_LGR_NAME: return lgrName();
case INPUT_SEGMENT_NUMBER: return std::to_string(wellSegmentNumber());
case INPUT_AQUIFER_NUMBER: return std::to_string(aquiferNumber());
@@ -719,6 +719,18 @@ bool RifEclipseSummaryAddress::isValid() const
return true;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RifEclipseSummaryAddress::setCellIjk(const std::string& uiText)
{
auto vec = RifEclipseSummaryAddress::ijkTupleFromUiText(uiText);
m_cellI = std::get<0>(vec);
m_cellJ = std::get<1>(vec);
m_cellK = std::get<2>(vec);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -770,7 +782,7 @@ std::string RifEclipseSummaryAddress::baseQuantityName(const std::string& quanti
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::string RifEclipseSummaryAddress::formatUiTextIJK() const
std::string RifEclipseSummaryAddress::blockAsString() const
{
return std::to_string(this->cellI()) + ", "
+ std::to_string(this->cellJ()) + ", "

View File

@@ -162,6 +162,7 @@ public:
int cellJ() const { return m_cellJ; }
int cellK() const { return m_cellK; }
int aquiferNumber() const { return m_aquiferNumber; }
std::string blockAsString() const;
const std::string ensembleStatisticsQuantityName() const;
@@ -176,6 +177,8 @@ public:
void setWellGroupName(const std::string& wellGroupName) { m_wellGroupName = wellGroupName; }
void setRegion(int region) { m_regionNumber = (int16_t)region; }
void setAquiferNumber(int aquiferNumber) { m_aquiferNumber = (int16_t)aquiferNumber; }
void setCellIjk(const std::string& uiText);
void setWellSegmentNumber(int segment) { m_wellSegmentNumber = (int16_t)segment; }
void setAsErrorResult() { m_isErrorResult = true; }
bool isErrorResult() const { return m_isErrorResult; }
@@ -184,7 +187,6 @@ public:
private:
bool isValidEclipseCategory() const;
static std::string baseQuantityName(const std::string& quantityName);
std::string formatUiTextIJK() const;
static std::tuple<int32_t, int32_t, int32_t> ijkTupleFromUiText(const std::string &s);
std::string formatUiTextRegionToRegion() const;
std::pair<int16_t, int16_t> regionToRegionPairFromUiText(const std::string &s);