diff --git a/ApplicationCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp b/ApplicationCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp index f29b8f9b06..d6b19ae5fb 100644 --- a/ApplicationCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp +++ b/ApplicationCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp @@ -280,6 +280,7 @@ RimSummaryCurve* RicPlotProductionRateFeature::addSummaryCurve( RimSummaryPlot* "", -1, -1, + -1, -1); if (!gridSummaryCase->summaryReader()->hasAddress(addr)) diff --git a/ApplicationCode/FileInterface/RifEclipseSummaryAddress.cpp b/ApplicationCode/FileInterface/RifEclipseSummaryAddress.cpp index c946d767e1..685e7e94b5 100644 --- a/ApplicationCode/FileInterface/RifEclipseSummaryAddress.cpp +++ b/ApplicationCode/FileInterface/RifEclipseSummaryAddress.cpp @@ -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; diff --git a/ApplicationCode/FileInterface/RifEclipseSummaryAddress.h b/ApplicationCode/FileInterface/RifEclipseSummaryAddress.h index 26ac94b481..6846cdedbf 100644 --- a/ApplicationCode/FileInterface/RifEclipseSummaryAddress.h +++ b/ApplicationCode/FileInterface/RifEclipseSummaryAddress.h @@ -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); diff --git a/ApplicationCode/FileInterface/RifEclipseUserDataKeywordTools.cpp b/ApplicationCode/FileInterface/RifEclipseUserDataKeywordTools.cpp index e319a3fe4b..f7fdb4fe78 100644 --- a/ApplicationCode/FileInterface/RifEclipseUserDataKeywordTools.cpp +++ b/ApplicationCode/FileInterface/RifEclipseUserDataKeywordTools.cpp @@ -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); } diff --git a/ApplicationCode/FileInterface/RifKeywordVectorUserData.cpp b/ApplicationCode/FileInterface/RifKeywordVectorUserData.cpp index 98d8d5ee3f..b6c9e6403a 100644 --- a/ApplicationCode/FileInterface/RifKeywordVectorUserData.cpp +++ b/ApplicationCode/FileInterface/RifKeywordVectorUserData.cpp @@ -175,8 +175,8 @@ bool RifKeywordVectorUserData::parse(const QString& data, const QString& customW "", -1, -1, - -1 - ); + -1, + -1); m_allResultAddresses.push_back(addr); diff --git a/ApplicationCode/FileInterface/RifReaderEclipseSummary.cpp b/ApplicationCode/FileInterface/RifReaderEclipseSummary.cpp index 9cfa261ae2..a3aa42cf00 100644 --- a/ApplicationCode/FileInterface/RifReaderEclipseSummary.cpp +++ b/ApplicationCode/FileInterface/RifReaderEclipseSummary.cpp @@ -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); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/FileInterface/RifReaderObservedData.cpp b/ApplicationCode/FileInterface/RifReaderObservedData.cpp index ac65811efa..7b512a42fe 100644 --- a/ApplicationCode/FileInterface/RifReaderObservedData.cpp +++ b/ApplicationCode/FileInterface/RifReaderObservedData.cpp @@ -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); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryAddress.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryAddress.cpp index 817b2ec90b..6747f0a0b6 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryAddress.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryAddress.cpp @@ -67,9 +67,10 @@ RimSummaryAddress::RimSummaryAddress() CAF_PDM_InitFieldNoDefault(&m_cellI, "SummaryCellI", "I", "", "", ""); CAF_PDM_InitFieldNoDefault(&m_cellJ, "SummaryCellJ", "J", "", "", ""); CAF_PDM_InitFieldNoDefault(&m_cellK, "SummaryCellK", "K", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_aquiferNumber, "SummaryAquifer", "Aquifer", "", "", ""); m_category = RifEclipseSummaryAddress::SUMMARY_INVALID; - m_regionNumber = m_regionNumber2 = m_wellSegmentNumber = m_cellI = m_cellJ = m_cellK = -1; + m_regionNumber = m_regionNumber2 = m_wellSegmentNumber = m_cellI = m_cellJ = m_cellK = m_aquiferNumber -1; } //-------------------------------------------------------------------------------------------------- @@ -93,6 +94,7 @@ void RimSummaryAddress::setAddress(const RifEclipseSummaryAddress& addr) m_wellName = addr.wellName().c_str(); m_wellSegmentNumber = addr.wellSegmentNumber(); m_lgrName = addr.lgrName().c_str(); + m_aquiferNumber = addr.aquiferNumber(); m_cellI = addr.cellI(); m_cellJ = addr.cellJ(); m_cellK = addr.cellK(); } @@ -110,6 +112,7 @@ RifEclipseSummaryAddress RimSummaryAddress::address() m_wellName().toStdString(), m_wellSegmentNumber(), m_lgrName().toStdString(), - m_cellI(), m_cellJ(), m_cellK()); + m_cellI(), m_cellJ(), m_cellK(), + m_aquiferNumber); } diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryAddress.h b/ApplicationCode/ProjectDataModel/Summary/RimSummaryAddress.h index c2519659e4..dfded3189e 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryAddress.h +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryAddress.h @@ -62,6 +62,6 @@ private: caf::PdmField m_cellI; caf::PdmField m_cellJ; caf::PdmField m_cellK; - + caf::PdmField m_aquiferNumber; }; diff --git a/ApplicationCode/UserInterface/RiuSummaryCurveDefSelection.cpp b/ApplicationCode/UserInterface/RiuSummaryCurveDefSelection.cpp index 3449269099..996721946b 100644 --- a/ApplicationCode/UserInterface/RiuSummaryCurveDefSelection.cpp +++ b/ApplicationCode/UserInterface/RiuSummaryCurveDefSelection.cpp @@ -84,6 +84,7 @@ RiuSummaryCurveDefSelection::RiuSummaryCurveDefSelection() : m_identifierFieldsM { new SummaryIdentifierAndField(RifEclipseSummaryAddress::INPUT_VECTOR_NAME) } } }, { RifEclipseSummaryAddress::SUMMARY_AQUIFER, { + { new SummaryIdentifierAndField(RifEclipseSummaryAddress::INPUT_AQUIFER_NUMBER) }, { new SummaryIdentifierAndField(RifEclipseSummaryAddress::INPUT_VECTOR_NAME) } } }, { RifEclipseSummaryAddress::SUMMARY_NETWORK, { @@ -155,7 +156,8 @@ RiuSummaryCurveDefSelection::RiuSummaryCurveDefSelection() : m_identifierFieldsM CAF_PDM_InitFieldNoDefault(m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_FIELD][0]->pdmField(), "FieldVectors", "Field vectors", "", "", ""); - CAF_PDM_InitFieldNoDefault(m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_AQUIFER][0]->pdmField(), "AquiferVectors", "Aquifer Vectors", "", "", ""); + CAF_PDM_InitFieldNoDefault(m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_AQUIFER][0]->pdmField(), "Aquifers", "Aquifers", "", "", ""); + CAF_PDM_InitFieldNoDefault(m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_AQUIFER][1]->pdmField(), "AquiferVectors", "Aquifer Vectors", "", "", ""); CAF_PDM_InitFieldNoDefault(m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_NETWORK][0]->pdmField(), "NetworkVectors", "Network Vectors", "", "", ""); @@ -586,7 +588,12 @@ void RiuSummaryCurveDefSelection::defineUiOrdering(QString uiConfigName, caf::Pd } else if (sumCategory == RifEclipseSummaryAddress::SUMMARY_AQUIFER) { - summaryiesField = m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_AQUIFER][0]->pdmField(); + { + caf::PdmUiGroup* myGroup = uiOrdering.addNewGroup("Aquifers"); + myGroup->add(m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_AQUIFER][0]->pdmField()); + } + + summaryiesField = m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_AQUIFER][1]->pdmField(); } else if (sumCategory == RifEclipseSummaryAddress::SUMMARY_NETWORK) {