mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1957 Observed Data : Add setters for well name and well group name
This commit is contained in:
@@ -192,6 +192,72 @@ std::string RifEclipseSummaryAddress::uiText(RifEclipseSummaryAddress::SummaryId
|
||||
return "";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifEclipseSummaryAddress::isValid() const
|
||||
{
|
||||
switch (category())
|
||||
{
|
||||
case SUMMARY_REGION:
|
||||
if (m_regionNumber == -1) return false;
|
||||
return true;
|
||||
|
||||
case SUMMARY_REGION_2_REGION:
|
||||
if (m_regionNumber == -1) return false;
|
||||
if (m_regionNumber2 == -1) return false;
|
||||
return true;
|
||||
|
||||
case SUMMARY_WELL_GROUP:
|
||||
if (m_wellGroupName.size() == 0) return false;
|
||||
return true;
|
||||
|
||||
case SUMMARY_WELL:
|
||||
if (m_wellName.size() == 0) return false;
|
||||
return true;
|
||||
|
||||
case SUMMARY_WELL_COMPLETION:
|
||||
if (m_wellName.size() == 0) return false;
|
||||
if (m_cellI == -1) return false;
|
||||
if (m_cellJ == -1) return false;
|
||||
if (m_cellK == -1) return false;
|
||||
return true;
|
||||
|
||||
case SUMMARY_WELL_LGR:
|
||||
if (m_lgrName.size() == 0) return false;
|
||||
if (m_wellName.size() == 0) return false;
|
||||
return true;
|
||||
|
||||
case SUMMARY_WELL_COMPLETION_LGR:
|
||||
if (m_lgrName.size() == 0) return false;
|
||||
if (m_wellName.size() == 0) return false;
|
||||
if (m_cellI == -1) return false;
|
||||
if (m_cellJ == -1) return false;
|
||||
if (m_cellK == -1) return false;
|
||||
return true;
|
||||
|
||||
case SUMMARY_WELL_SEGMENT:
|
||||
if (m_wellName.size() == 0) return false;
|
||||
if (m_wellSegmentNumber == -1) return false;
|
||||
return true;
|
||||
|
||||
case SUMMARY_BLOCK:
|
||||
if (m_cellI == -1) return false;
|
||||
if (m_cellJ == -1) return false;
|
||||
if (m_cellK == -1) return false;
|
||||
return true;
|
||||
|
||||
case SUMMARY_BLOCK_LGR:
|
||||
if (m_lgrName.size() == 0) return false;
|
||||
if (m_cellI == -1) return false;
|
||||
if (m_cellJ == -1) return false;
|
||||
if (m_cellK == -1) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -129,6 +129,10 @@ public:
|
||||
std::string uiText() const;
|
||||
std::string uiText(RifEclipseSummaryAddress::SummaryIdentifierType itemTypeInput) const;
|
||||
|
||||
bool isValid() const;
|
||||
void setWellName(const std::string& wellName) { m_wellName = wellName; }
|
||||
void setWellGroupName(const std::string& wellGroupName) { m_wellGroupName = wellGroupName; }
|
||||
|
||||
private:
|
||||
|
||||
std::string formatUiTextIJK() const;
|
||||
|
||||
Reference in New Issue
Block a user