mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fixed issue related to computation of SOIL. Mark metadata for derived SOIL with mustBeCalculated.
p4#: 21220
This commit is contained in:
@@ -350,7 +350,7 @@ size_t RigCaseCellResultsData::addEmptyScalarResult(RimDefines::ResultCatType ty
|
||||
{
|
||||
scalarResultIndex = this->resultCount();
|
||||
m_cellScalarResults.push_back(std::vector<std::vector<double> >());
|
||||
ResultInfo resInfo(type, needsToBeStored, resultName, scalarResultIndex);
|
||||
ResultInfo resInfo(type, needsToBeStored, false, resultName, scalarResultIndex);
|
||||
m_resultInfos.push_back(resInfo);
|
||||
}
|
||||
|
||||
@@ -540,3 +540,35 @@ RifReaderInterface::PorosityModelResultType RigCaseCellResultsData::convertFromP
|
||||
return RifReaderInterface::FRACTURE_RESULTS;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigCaseCellResultsData::mustBeCalculated(size_t scalarResultIndex) const
|
||||
{
|
||||
std::vector<ResultInfo>::const_iterator it;
|
||||
for (it = m_resultInfos.begin(); it != m_resultInfos.end(); it++)
|
||||
{
|
||||
if (it->m_gridScalarResultIndex == scalarResultIndex)
|
||||
{
|
||||
return it->m_mustBeCalculated;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigCaseCellResultsData::setMustBeCalculated(size_t scalarResultIndex)
|
||||
{
|
||||
std::vector<ResultInfo>::iterator it;
|
||||
for (it = m_resultInfos.begin(); it != m_resultInfos.end(); it++)
|
||||
{
|
||||
if (it->m_gridScalarResultIndex == scalarResultIndex)
|
||||
{
|
||||
it->m_mustBeCalculated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -80,18 +80,23 @@ public:
|
||||
class ResultInfo
|
||||
{
|
||||
public:
|
||||
ResultInfo(RimDefines::ResultCatType resultType, bool needsToBeStored, QString resultName, size_t gridScalarResultIndex)
|
||||
: m_resultType(resultType), m_needsToBeStored(needsToBeStored), m_resultName(resultName), m_gridScalarResultIndex(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) { }
|
||||
|
||||
public:
|
||||
RimDefines::ResultCatType m_resultType;
|
||||
bool m_needsToBeStored;
|
||||
bool m_mustBeCalculated;
|
||||
QString m_resultName;
|
||||
size_t m_gridScalarResultIndex;
|
||||
std::vector<QDateTime> m_timeStepDates;
|
||||
};
|
||||
|
||||
const std::vector<ResultInfo>& infoForEachResultIndex() { return m_resultInfos;}
|
||||
|
||||
bool mustBeCalculated(size_t scalarResultIndex) const;
|
||||
void setMustBeCalculated(size_t scalarResultIndex);
|
||||
|
||||
|
||||
public:
|
||||
size_t addStaticScalarResult(RimDefines::ResultCatType type,
|
||||
|
||||
Reference in New Issue
Block a user