#1767 Add allTimeSteps() to get all time steps from file

This commit is contained in:
Magne Sjaastad 2017-08-28 15:17:03 +02:00
parent d4663fe6df
commit c443aefa5e
2 changed files with 18 additions and 1 deletions

View File

@ -986,6 +986,21 @@ void RifReaderEclipseOutput::sourSimRlResult(const QString& result, size_t stepI
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<QDateTime> RifReaderEclipseOutput::allTimeSteps() const
{
std::vector<QDateTime> steps;
if (m_dynamicResultsAccess.notNull())
{
std::vector<double> dymmy;
m_dynamicResultsAccess->timeSteps(&steps, &dymmy);
}
return steps;
}
//--------------------------------------------------------------------------------------------------
/// Get dynamic result at given step index. Will concatenate values for the main grid and all sub grids.
//--------------------------------------------------------------------------------------------------

View File

@ -63,6 +63,8 @@ public:
bool dynamicResult(const QString& result, RiaDefines::PorosityModelType matrixOrFracture, size_t stepIndex, std::vector<double>* values);
void sourSimRlResult(const QString& result, size_t stepIndex, std::vector<double>* values);
std::vector<QDateTime> allTimeSteps() const;
static bool transferGeometry(const ecl_grid_type* mainEclGrid, RigEclipseCaseData* eclipseCase);
static void transferCoarseningInfo(const ecl_grid_type* eclGrid, RigGridBase* grid);
@ -98,7 +100,7 @@ private:
RigEclipseCaseData* m_eclipseCase;
ecl_file_type* m_ecl_init_file; // File access to static results
cvf::ref<RifEclipseRestartDataAccess> m_dynamicResultsAccess; // File access to dynamic results
mutable cvf::ref<RifEclipseRestartDataAccess> m_dynamicResultsAccess; // File access to dynamic results
std::unique_ptr<RifHdf5ReaderInterface> m_hdfReaderInterface;
};