mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-24 23:36:50 -06:00
#3152 Observed data import. Fix accumulated data determination
This commit is contained in:
parent
3bc595dcb2
commit
19ce35432c
@ -717,8 +717,39 @@ bool RifEclipseSummaryAddress::isValid() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RifEclipseSummaryAddress::hasAccumulatedData() const
|
bool RifEclipseSummaryAddress::hasAccumulatedData() const
|
||||||
{
|
{
|
||||||
return QString::fromStdString(m_quantityName).endsWith("T") ||
|
if (!isValidEclipseCategory()) return false;
|
||||||
QString::fromStdString(m_quantityName).endsWith("TH");
|
|
||||||
|
QString qBaseName = QString::fromStdString(quantityName());
|
||||||
|
if (qBaseName.size() == 8) qBaseName.chop(3);
|
||||||
|
while (qBaseName.endsWith("_")) qBaseName.chop(1);
|
||||||
|
|
||||||
|
return qBaseName.endsWith("T") || qBaseName.endsWith("TH");
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RifEclipseSummaryAddress::isValidEclipseCategory() const
|
||||||
|
{
|
||||||
|
switch (category())
|
||||||
|
{
|
||||||
|
case SUMMARY_FIELD:
|
||||||
|
case SUMMARY_AQUIFER:
|
||||||
|
case SUMMARY_NETWORK:
|
||||||
|
case SUMMARY_MISC:
|
||||||
|
case SUMMARY_REGION:
|
||||||
|
case SUMMARY_REGION_2_REGION:
|
||||||
|
case SUMMARY_WELL_GROUP:
|
||||||
|
case SUMMARY_WELL:
|
||||||
|
case SUMMARY_WELL_COMPLETION:
|
||||||
|
case SUMMARY_WELL_LGR:
|
||||||
|
case SUMMARY_WELL_COMPLETION_LGR:
|
||||||
|
case SUMMARY_WELL_SEGMENT:
|
||||||
|
case SUMMARY_BLOCK:
|
||||||
|
case SUMMARY_BLOCK_LGR:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -177,7 +177,7 @@ public:
|
|||||||
void setAsErrorResult() { m_isErrorResult = true; }
|
void setAsErrorResult() { m_isErrorResult = true; }
|
||||||
bool isErrorResult() const { return m_isErrorResult; }
|
bool isErrorResult() const { return m_isErrorResult; }
|
||||||
bool hasAccumulatedData() const;
|
bool hasAccumulatedData() const;
|
||||||
|
bool isValidEclipseCategory() const;
|
||||||
private:
|
private:
|
||||||
|
|
||||||
std::string formatUiTextIJK() const;
|
std::string formatUiTextIJK() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user