mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2249 Summary Plot Editor. Support for plotting individual aquifers
This commit is contained in:
@@ -88,6 +88,9 @@ RifEclipseSummaryAddress::RifEclipseSummaryAddress(SummaryVarCategory category,
|
||||
m_cellJ = std::get<1>(ijkTuple);
|
||||
m_cellK = std::get<2>(ijkTuple);
|
||||
break;
|
||||
case SUMMARY_AQUIFER:
|
||||
m_aquiferNumber = RiaStdStringTools::toInt(identifiers[INPUT_AQUIFER_NUMBER]);
|
||||
break;
|
||||
}
|
||||
|
||||
// Set quantity for all categories
|
||||
@@ -195,6 +198,11 @@ std::string RifEclipseSummaryAddress::uiText() const
|
||||
text += ":" + formatUiTextIJK();
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_AQUIFER:
|
||||
{
|
||||
text += ":" + std::to_string(this->aquiferNumber());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return text;
|
||||
@@ -214,6 +222,7 @@ std::string RifEclipseSummaryAddress::uiText(RifEclipseSummaryAddress::SummaryId
|
||||
case RifEclipseSummaryAddress::INPUT_CELL_IJK: return formatUiTextIJK();
|
||||
case RifEclipseSummaryAddress::INPUT_LGR_NAME: return lgrName();
|
||||
case RifEclipseSummaryAddress::INPUT_SEGMENT_NUMBER: return std::to_string(wellSegmentNumber());
|
||||
case RifEclipseSummaryAddress::INPUT_AQUIFER_NUMBER: return std::to_string(aquiferNumber());
|
||||
case RifEclipseSummaryAddress::INPUT_VECTOR_NAME: return quantityName();
|
||||
}
|
||||
return "";
|
||||
@@ -283,6 +292,10 @@ bool RifEclipseSummaryAddress::isValid() const
|
||||
if (m_cellJ == -1) return false;
|
||||
if (m_cellK == -1) return false;
|
||||
return true;
|
||||
|
||||
case SUMMARY_AQUIFER:
|
||||
if (m_aquiferNumber == -1) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -409,7 +422,11 @@ bool operator==(const RifEclipseSummaryAddress& first, const RifEclipseSummaryAd
|
||||
if(first.cellK() != second.cellK()) return false;
|
||||
}
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SUMMARY_AQUIFER:
|
||||
{
|
||||
if (first.aquiferNumber() != second.aquiferNumber()) return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -489,6 +506,11 @@ bool operator<(const RifEclipseSummaryAddress& first, const RifEclipseSummaryAdd
|
||||
if(first.cellK() != second.cellK()) return (first.cellK() < second.cellK());
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_AQUIFER:
|
||||
{
|
||||
if (first.aquiferNumber() != second.aquiferNumber()) return first.aquiferNumber() < second.aquiferNumber();
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -59,7 +59,8 @@ public:
|
||||
INPUT_CELL_IJK,
|
||||
INPUT_LGR_NAME,
|
||||
INPUT_SEGMENT_NUMBER,
|
||||
INPUT_VECTOR_NAME
|
||||
INPUT_AQUIFER_NUMBER,
|
||||
INPUT_VECTOR_NAME,
|
||||
};
|
||||
|
||||
public:
|
||||
@@ -71,7 +72,8 @@ public:
|
||||
m_wellSegmentNumber(-1),
|
||||
m_cellI(-1),
|
||||
m_cellJ(-1),
|
||||
m_cellK(-1)
|
||||
m_cellK(-1),
|
||||
m_aquiferNumber(-1)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -85,7 +87,8 @@ public:
|
||||
const std::string& lgrName,
|
||||
int cellI,
|
||||
int cellJ,
|
||||
int cellK):
|
||||
int cellK,
|
||||
int aquiferNumber):
|
||||
m_variableCategory(category),
|
||||
m_quantityName(quantityName),
|
||||
m_regionNumber(regionNumber),
|
||||
@@ -96,7 +99,8 @@ public:
|
||||
m_lgrName(lgrName),
|
||||
m_cellI(cellI),
|
||||
m_cellJ(cellJ),
|
||||
m_cellK(cellK)
|
||||
m_cellK(cellK),
|
||||
m_aquiferNumber(aquiferNumber)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -124,6 +128,7 @@ public:
|
||||
int cellI() const { return m_cellI; }
|
||||
int cellJ() const { return m_cellJ; }
|
||||
int cellK() const { return m_cellK; }
|
||||
int aquiferNumber() const { return m_aquiferNumber; }
|
||||
|
||||
// Derived properties
|
||||
|
||||
@@ -135,6 +140,7 @@ public:
|
||||
void setWellName(const std::string& wellName) { m_wellName = wellName; }
|
||||
void setWellGroupName(const std::string& wellGroupName) { m_wellGroupName = wellGroupName; }
|
||||
void setRegion(int region) { m_regionNumber = region; }
|
||||
void setAquiferNumber(int aquiferNumber) { m_aquiferNumber = aquiferNumber; }
|
||||
|
||||
private:
|
||||
|
||||
@@ -154,6 +160,7 @@ private:
|
||||
int m_cellI;
|
||||
int m_cellJ;
|
||||
int m_cellK;
|
||||
int m_aquiferNumber;
|
||||
};
|
||||
|
||||
bool operator==(const RifEclipseSummaryAddress& first, const RifEclipseSummaryAddress& second);
|
||||
|
||||
@@ -167,13 +167,20 @@ RifEclipseSummaryAddress RifEclipseUserDataKeywordTools::makeAndFillAddress(cons
|
||||
int cellI = -1;
|
||||
int cellJ = -1;
|
||||
int cellK = -1;
|
||||
int aquiferNumber = -1;
|
||||
|
||||
switch (category)
|
||||
{
|
||||
case RifEclipseSummaryAddress::SUMMARY_FIELD:
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_AQUIFER:
|
||||
{
|
||||
if (columnHeaderText.size() > 0)
|
||||
{
|
||||
aquiferNumber = RiaStdStringTools::toInt(columnHeaderText[0]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case RifEclipseSummaryAddress::SUMMARY_NETWORK:
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_MISC:
|
||||
@@ -268,7 +275,8 @@ RifEclipseSummaryAddress RifEclipseUserDataKeywordTools::makeAndFillAddress(cons
|
||||
lgrName,
|
||||
cellI,
|
||||
cellJ,
|
||||
cellK);
|
||||
cellK,
|
||||
aquiferNumber);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -175,8 +175,8 @@ bool RifKeywordVectorUserData::parse(const QString& data, const QString& customW
|
||||
"",
|
||||
-1,
|
||||
-1,
|
||||
-1
|
||||
);
|
||||
-1,
|
||||
-1);
|
||||
|
||||
m_allResultAddresses.push_back(addr);
|
||||
|
||||
|
||||
@@ -112,6 +112,7 @@ RifEclipseSummaryAddress addressFromErtSmSpecNode(const smspec_node_type * ertSu
|
||||
int cellI(-1);
|
||||
int cellJ(-1);
|
||||
int cellK(-1);
|
||||
int aquiferNumber(-1);
|
||||
|
||||
quantityName = smspec_node_get_keyword(ertSumVarNode);
|
||||
|
||||
@@ -120,6 +121,7 @@ RifEclipseSummaryAddress addressFromErtSmSpecNode(const smspec_node_type * ertSu
|
||||
case ECL_SMSPEC_AQUIFER_VAR:
|
||||
{
|
||||
sumCategory = RifEclipseSummaryAddress::SUMMARY_AQUIFER;
|
||||
aquiferNumber = smspec_node_get_num(ertSumVarNode);
|
||||
}
|
||||
break;
|
||||
case ECL_SMSPEC_WELL_VAR:
|
||||
@@ -230,7 +232,8 @@ RifEclipseSummaryAddress addressFromErtSmSpecNode(const smspec_node_type * ertSu
|
||||
wellName,
|
||||
wellSegmentNumber,
|
||||
lgrName,
|
||||
cellI, cellJ, cellK);
|
||||
cellI, cellJ, cellK,
|
||||
aquiferNumber);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -143,6 +143,7 @@ RifEclipseSummaryAddress RifReaderObservedData::address(const QString& quantity,
|
||||
int cellI(-1);
|
||||
int cellJ(-1);
|
||||
int cellK(-1);
|
||||
int aquiferNumber(-1);
|
||||
|
||||
switch (summaryCategory)
|
||||
{
|
||||
@@ -167,7 +168,8 @@ RifEclipseSummaryAddress RifReaderObservedData::address(const QString& quantity,
|
||||
wellName,
|
||||
wellSegmentNumber,
|
||||
lgrName,
|
||||
cellI, cellJ, cellK);
|
||||
cellI, cellJ, cellK,
|
||||
aquiferNumber);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user