#1123 Fixed missing timestep problem. Using Report Step Number, not timestep index.

This commit is contained in:
Jacob Støren
2017-01-12 12:04:54 +01:00
parent b584590588
commit 3d7d3096eb
8 changed files with 72 additions and 30 deletions

View File

@@ -44,11 +44,12 @@ void RimEclipseStatisticsCaseEvaluator::addNamedResult(RigCaseCellResultsData* d
CVF_ASSERT(m_sourceCases.size() > 0);
std::vector<QDateTime> sourceTimeStepDates = m_sourceCases[0]->results(RifReaderInterface::MATRIX_RESULTS)->cellResults()->timeStepDates(0);
std::vector<int> sourceReportStepNumbers = m_sourceCases[0]->results(RifReaderInterface::MATRIX_RESULTS)->cellResults()->reportStepNumbers(0);
size_t destinationScalarResultIndex = destinationCellResults->addEmptyScalarResult(resultType, resultName, true);
CVF_ASSERT(destinationScalarResultIndex != cvf::UNDEFINED_SIZE_T);
destinationCellResults->setTimeStepDates(destinationScalarResultIndex, sourceTimeStepDates);
destinationCellResults->setTimeStepDates(destinationScalarResultIndex, sourceTimeStepDates, sourceReportStepNumbers);
std::vector< std::vector<double> >& dataValues = destinationCellResults->cellScalarResults(destinationScalarResultIndex);
dataValues.resize(sourceTimeStepDates.size());