mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge branch 'fishbones' into pre-proto
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include "RimTools.h"
|
||||
|
||||
#include "cafProgressInfo.h"
|
||||
#include "cafUtils.h"
|
||||
|
||||
#include "cvfGeometryTools.h"
|
||||
|
||||
@@ -137,6 +138,7 @@ void RimReservoirCellResultsStorage::setupBeforeSave()
|
||||
cacheEntry->m_resultType = resInfo[rIdx].m_resultType;
|
||||
cacheEntry->m_resultName = resInfo[rIdx].m_resultName;
|
||||
cacheEntry->m_timeStepDates = resInfo[rIdx].m_timeStepDates;
|
||||
cacheEntry->m_daysSinceSimulationStart = resInfo[rIdx].m_daysSinceSimulationStart;
|
||||
|
||||
// Take note of the file position for fast lookup later
|
||||
cacheEntry->m_filePosition = cacheFile.pos();
|
||||
@@ -1393,16 +1395,15 @@ void RimReservoirCellResultsStorage::setCellResults(RigCaseCellResultsData* cell
|
||||
// Get the name of the cache name relative to the current project file position
|
||||
QString newValidCacheFileName = getValidCacheFileName();
|
||||
|
||||
QFile storageFile(newValidCacheFileName);
|
||||
|
||||
// Warn if we thought we were to find some data on the storage file
|
||||
|
||||
if (!storageFile.exists() && m_resultCacheMetaData.size())
|
||||
if (!caf::Utils::fileExists(newValidCacheFileName) && m_resultCacheMetaData.size())
|
||||
{
|
||||
qWarning() << "Reading stored results: Missing the storage file : " + newValidCacheFileName;
|
||||
return;
|
||||
}
|
||||
|
||||
QFile storageFile(newValidCacheFileName);
|
||||
if (!storageFile.open(QIODevice::ReadOnly))
|
||||
{
|
||||
qWarning() << "Reading stored results: Can't open the file : " + newValidCacheFileName;
|
||||
@@ -1436,7 +1437,7 @@ void RimReservoirCellResultsStorage::setCellResults(RigCaseCellResultsData* cell
|
||||
RimReservoirCellResultsStorageEntryInfo* resInfo = m_resultCacheMetaData[rIdx];
|
||||
size_t resultIndex = m_cellResults->addEmptyScalarResult(resInfo->m_resultType(), resInfo->m_resultName(), true);
|
||||
|
||||
m_cellResults->setTimeStepDates(resultIndex, resInfo->m_timeStepDates(), std::vector<int>()); // Hack: Using no report step numbers. Not really used except for Flow Diagnostics...
|
||||
m_cellResults->setTimeStepDates(resultIndex, resInfo->m_timeStepDates(), resInfo->m_daysSinceSimulationStart(), std::vector<int>()); // Hack: Using no report step numbers. Not really used except for Flow Diagnostics...
|
||||
|
||||
progress.setProgressDescription(resInfo->m_resultName);
|
||||
|
||||
@@ -1531,6 +1532,7 @@ RimReservoirCellResultsStorageEntryInfo::RimReservoirCellResultsStorageEntryInfo
|
||||
CAF_PDM_InitField(&m_resultType, "ResultType", caf::AppEnum<RimDefines::ResultCatType>(RimDefines::REMOVED), "ResultType", "", "" ,"");
|
||||
CAF_PDM_InitField(&m_resultName, "ResultName", QString(), "ResultName", "", "" ,"");
|
||||
CAF_PDM_InitFieldNoDefault(&m_timeStepDates, "TimeSteps", "TimeSteps", "", "" ,"");
|
||||
CAF_PDM_InitFieldNoDefault(&m_daysSinceSimulationStart, "DaysSinceSimulationStart", "DaysSinceSimulationStart", "", "", "");
|
||||
CAF_PDM_InitField(&m_filePosition, "FilePositionDataStart", qint64(-1), "FilePositionDataStart", "", "" ,"");
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user