mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1387 Added support for delete of existing sour sim data
This commit is contained in:
@@ -619,6 +619,33 @@ void RigCaseCellResultsData::setMustBeCalculated(size_t scalarResultIndex)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RigCaseCellResultsData::setSourSimData(size_t scalarResultIndex)
|
||||||
|
{
|
||||||
|
CVF_ASSERT(scalarResultIndex < m_resultInfos.size());
|
||||||
|
|
||||||
|
m_resultInfos[scalarResultIndex].m_isSourSimData = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RigCaseCellResultsData::eraseAllSourSimData()
|
||||||
|
{
|
||||||
|
std::vector<size_t> sourSimIndices;
|
||||||
|
|
||||||
|
for (size_t i = 0; i < m_resultInfos.size(); i++)
|
||||||
|
{
|
||||||
|
ResultInfo& ri = m_resultInfos[i];
|
||||||
|
if (ri.m_isSourSimData)
|
||||||
|
{
|
||||||
|
ri.m_resultType = RimDefines::REMOVED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -109,7 +109,13 @@ public:
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ResultInfo(RimDefines::ResultCatType resultType, bool needsToBeStored, bool mustBeCalculated, QString resultName, size_t gridScalarResultIndex)
|
ResultInfo(RimDefines::ResultCatType resultType, bool needsToBeStored, bool mustBeCalculated, QString resultName, size_t gridScalarResultIndex)
|
||||||
: m_resultType(resultType), m_needsToBeStored(needsToBeStored), m_resultName(resultName), m_gridScalarResultIndex(gridScalarResultIndex), m_mustBeCalculated(mustBeCalculated) { }
|
: m_resultType(resultType),
|
||||||
|
m_needsToBeStored(needsToBeStored),
|
||||||
|
m_resultName(resultName),
|
||||||
|
m_gridScalarResultIndex(gridScalarResultIndex),
|
||||||
|
m_mustBeCalculated(mustBeCalculated),
|
||||||
|
m_isSourSimData(false)
|
||||||
|
{ }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RimDefines::ResultCatType m_resultType;
|
RimDefines::ResultCatType m_resultType;
|
||||||
@@ -119,12 +125,15 @@ public:
|
|||||||
size_t m_gridScalarResultIndex;
|
size_t m_gridScalarResultIndex;
|
||||||
std::vector<QDateTime> m_timeStepDates;
|
std::vector<QDateTime> m_timeStepDates;
|
||||||
std::vector<int> m_timeStepReportNumbers;
|
std::vector<int> m_timeStepReportNumbers;
|
||||||
|
bool m_isSourSimData;
|
||||||
};
|
};
|
||||||
|
|
||||||
const std::vector<ResultInfo>& infoForEachResultIndex() { return m_resultInfos;}
|
const std::vector<ResultInfo>& infoForEachResultIndex() { return m_resultInfos;}
|
||||||
|
|
||||||
bool mustBeCalculated(size_t scalarResultIndex) const;
|
bool mustBeCalculated(size_t scalarResultIndex) const;
|
||||||
void setMustBeCalculated(size_t scalarResultIndex);
|
void setMustBeCalculated(size_t scalarResultIndex);
|
||||||
|
void setSourSimData(size_t scalarResultIndex);
|
||||||
|
void eraseAllSourSimData();
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user