#1691 Rename to RigResultInfo

This commit is contained in:
Magne Sjaastad 2017-08-11 07:57:55 +02:00
parent 3253c8968e
commit 6b90a94458
6 changed files with 14 additions and 15 deletions

View File

@ -242,7 +242,7 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
std::vector<double> daysSinceSimulationStart = rigCaseData->results(poroModel)->daysSinceSimulationStart(0); std::vector<double> daysSinceSimulationStart = rigCaseData->results(poroModel)->daysSinceSimulationStart(0);
std::vector<int> reportStepNumbers = rigCaseData->results(poroModel)->reportStepNumbers(0); std::vector<int> reportStepNumbers = rigCaseData->results(poroModel)->reportStepNumbers(0);
const std::vector<ResultInfo> resultInfos = rigCaseData->results(poroModel)->infoForEachResultIndex(); const std::vector<RigResultInfo> resultInfos = rigCaseData->results(poroModel)->infoForEachResultIndex();
for (size_t i = 1; i < caseCollection()->reservoirs.size(); i++) for (size_t i = 1; i < caseCollection()->reservoirs.size(); i++)
{ {

View File

@ -91,7 +91,7 @@ void RimReservoirCellResultsStorage::setupBeforeSave()
if (!m_cellResults) return; if (!m_cellResults) return;
const std::vector<ResultInfo>& resInfo = m_cellResults->infoForEachResultIndex(); const std::vector<RigResultInfo>& resInfo = m_cellResults->infoForEachResultIndex();
bool hasResultsToStore = false; bool hasResultsToStore = false;
for (size_t rIdx = 0; rIdx < resInfo.size(); ++rIdx) for (size_t rIdx = 0; rIdx < resInfo.size(); ++rIdx)

View File

@ -207,7 +207,7 @@ std::vector<double>& RigCaseCellResultsData::cellScalarResults(size_t scalarResu
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
size_t RigCaseCellResultsData::findScalarResultIndex(RiaDefines::ResultCatType type, const QString& resultName) const size_t RigCaseCellResultsData::findScalarResultIndex(RiaDefines::ResultCatType type, const QString& resultName) const
{ {
std::vector<ResultInfo>::const_iterator it; std::vector<RigResultInfo>::const_iterator it;
for (it = m_resultInfos.begin(); it != m_resultInfos.end(); ++it) for (it = m_resultInfos.begin(); it != m_resultInfos.end(); ++it)
{ {
if (it->m_resultType == type && it->m_resultName == resultName) if (it->m_resultType == type && it->m_resultName == resultName)
@ -268,7 +268,7 @@ size_t RigCaseCellResultsData::addEmptyScalarResult(RiaDefines::ResultCatType ty
scalarResultIndex = this->resultCount(); scalarResultIndex = this->resultCount();
m_cellScalarResults.push_back(std::vector<std::vector<double> >()); m_cellScalarResults.push_back(std::vector<std::vector<double> >());
ResultInfo resInfo(type, needsToBeStored, false, resultName, scalarResultIndex); RigResultInfo resInfo(type, needsToBeStored, false, resultName, scalarResultIndex);
m_resultInfos.push_back(resInfo); m_resultInfos.push_back(resInfo);
// Create statistics calculator and add statistics cache object // Create statistics calculator and add statistics cache object
@ -341,7 +341,7 @@ size_t RigCaseCellResultsData::addEmptyScalarResult(RiaDefines::ResultCatType ty
QStringList RigCaseCellResultsData::resultNames(RiaDefines::ResultCatType resType) const QStringList RigCaseCellResultsData::resultNames(RiaDefines::ResultCatType resType) const
{ {
QStringList varList; QStringList varList;
std::vector<ResultInfo>::const_iterator it; std::vector<RigResultInfo>::const_iterator it;
for (it = m_resultInfos.begin(); it != m_resultInfos.end(); ++it) for (it = m_resultInfos.begin(); it != m_resultInfos.end(); ++it)
{ {
if (it->m_resultType == resType ) if (it->m_resultType == resType )
@ -621,7 +621,7 @@ bool RigCaseCellResultsData::updateResultName(RiaDefines::ResultCatType resultTy
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RigCaseCellResultsData::mustBeCalculated(size_t scalarResultIndex) const bool RigCaseCellResultsData::mustBeCalculated(size_t scalarResultIndex) const
{ {
std::vector<ResultInfo>::const_iterator it; std::vector<RigResultInfo>::const_iterator it;
for (it = m_resultInfos.begin(); it != m_resultInfos.end(); ++it) for (it = m_resultInfos.begin(); it != m_resultInfos.end(); ++it)
{ {
if (it->m_gridScalarResultIndex == scalarResultIndex) if (it->m_gridScalarResultIndex == scalarResultIndex)
@ -638,7 +638,7 @@ bool RigCaseCellResultsData::mustBeCalculated(size_t scalarResultIndex) const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RigCaseCellResultsData::setMustBeCalculated(size_t scalarResultIndex) void RigCaseCellResultsData::setMustBeCalculated(size_t scalarResultIndex)
{ {
std::vector<ResultInfo>::iterator it; std::vector<RigResultInfo>::iterator it;
for (it = m_resultInfos.begin(); it != m_resultInfos.end(); ++it) for (it = m_resultInfos.begin(); it != m_resultInfos.end(); ++it)
{ {
if (it->m_gridScalarResultIndex == scalarResultIndex) if (it->m_gridScalarResultIndex == scalarResultIndex)

View File

@ -32,10 +32,10 @@
#include <cmath> #include <cmath>
class RifReaderInterface; class RifReaderInterface;
class RigMainGrid;
class RigActiveCellInfo; class RigActiveCellInfo;
class RigMainGrid;
class RigResultInfo;
class RigStatisticsDataCache; class RigStatisticsDataCache;
class ResultInfo;
//================================================================================================== //==================================================================================================
/// Class containing the results for the complete number of active cells. Both main grid and LGR's /// Class containing the results for the complete number of active cells. Both main grid and LGR's
@ -108,7 +108,7 @@ public:
bool updateResultName(RiaDefines::ResultCatType resultType, QString& oldName, const QString& newName); bool updateResultName(RiaDefines::ResultCatType resultType, QString& oldName, const QString& newName);
public: public:
const std::vector<ResultInfo>& infoForEachResultIndex() { return m_resultInfos;} const std::vector<RigResultInfo>& 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);
@ -127,9 +127,8 @@ private:
cvf::Collection<RigStatisticsDataCache> m_statisticsDataCache; cvf::Collection<RigStatisticsDataCache> m_statisticsDataCache;
private: private:
std::vector<ResultInfo> m_resultInfos; std::vector<RigResultInfo> m_resultInfos;
RigMainGrid* m_ownerMainGrid; RigMainGrid* m_ownerMainGrid;
RigActiveCellInfo* m_activeCellInfo; RigActiveCellInfo* m_activeCellInfo;
}; };

View File

@ -21,7 +21,7 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
ResultInfo::ResultInfo(RiaDefines::ResultCatType resultType, bool needsToBeStored, bool mustBeCalculated, RigResultInfo::RigResultInfo(RiaDefines::ResultCatType resultType, bool needsToBeStored, bool mustBeCalculated,
QString resultName, size_t gridScalarResultIndex) QString resultName, size_t gridScalarResultIndex)
: m_resultType(resultType), : m_resultType(resultType),
m_needsToBeStored(needsToBeStored), m_needsToBeStored(needsToBeStored),

View File

@ -24,10 +24,10 @@
class QString; class QString;
class ResultInfo class RigResultInfo
{ {
public: public:
ResultInfo(RiaDefines::ResultCatType resultType, bool needsToBeStored, bool mustBeCalculated, RigResultInfo(RiaDefines::ResultCatType resultType, bool needsToBeStored, bool mustBeCalculated,
QString resultName, size_t gridScalarResultIndex); QString resultName, size_t gridScalarResultIndex);
public: public: