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:
parent
14deedab77
commit
62d345cf1e
@ -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:
|
||||
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:
|
||||
RimDefines::ResultCatType m_resultType;
|
||||
@ -119,12 +125,15 @@ public:
|
||||
size_t m_gridScalarResultIndex;
|
||||
std::vector<QDateTime> m_timeStepDates;
|
||||
std::vector<int> m_timeStepReportNumbers;
|
||||
bool m_isSourSimData;
|
||||
};
|
||||
|
||||
const std::vector<ResultInfo>& infoForEachResultIndex() { return m_resultInfos;}
|
||||
|
||||
bool mustBeCalculated(size_t scalarResultIndex) const;
|
||||
void setMustBeCalculated(size_t scalarResultIndex);
|
||||
void setSourSimData(size_t scalarResultIndex);
|
||||
void eraseAllSourSimData();
|
||||
|
||||
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user