mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1357 Added access function to return time step vector with most time steps
This commit is contained in:
@@ -176,7 +176,7 @@ std::vector<double> RimGridTimeHistoryCurve::yValues() const
|
||||
RimReservoirCellResultsStorage* cellResStorage = m_eclipseResultDefinition->currentGridCellResults();
|
||||
RigCaseCellResultsData* cellResultsData = cellResStorage->cellResults();
|
||||
|
||||
std::vector<QDateTime> timeStepDates = cellResultsData->timeStepDates(m_eclipseResultDefinition->scalarResultIndex());
|
||||
std::vector<QDateTime> timeStepDates = cellResultsData->timeStepDates();
|
||||
|
||||
values = RigTimeHistoryResultAccessor::timeHistoryValues(eclTopItem->eclipseCase()->eclipseCaseData(), m_eclipseResultDefinition(), gridIndex, cellIndex, timeStepDates.size());
|
||||
}
|
||||
@@ -371,7 +371,7 @@ std::vector<time_t> RimGridTimeHistoryCurve::timeStepValues() const
|
||||
RimReservoirCellResultsStorage* cellResStorage = m_eclipseResultDefinition->currentGridCellResults();
|
||||
RigCaseCellResultsData* cellResultsData = cellResStorage->cellResults();
|
||||
|
||||
std::vector<QDateTime> timeStepDates = cellResultsData->timeStepDates(m_eclipseResultDefinition->scalarResultIndex());
|
||||
std::vector<QDateTime> timeStepDates = cellResultsData->timeStepDates();
|
||||
|
||||
for (QDateTime dt : timeStepDates)
|
||||
{
|
||||
|
||||
@@ -403,12 +403,23 @@ QDateTime RigCaseCellResultsData::timeStepDate(size_t scalarResultIndex, size_t
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<QDateTime> RigCaseCellResultsData::timeStepDates(size_t scalarResultIndex) const
|
||||
{
|
||||
if (scalarResultIndex < m_resultInfos.size() )
|
||||
return m_resultInfos[scalarResultIndex].m_timeStepDates;
|
||||
if (scalarResultIndex < m_resultInfos.size())
|
||||
return m_resultInfos[scalarResultIndex].m_timeStepDates;
|
||||
else
|
||||
return std::vector<QDateTime>();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<QDateTime> RigCaseCellResultsData::timeStepDates() const
|
||||
{
|
||||
size_t scalarResWithMostTimeSteps = cvf::UNDEFINED_SIZE_T;
|
||||
maxTimeStepCount(&scalarResWithMostTimeSteps);
|
||||
|
||||
return timeStepDates(scalarResWithMostTimeSteps);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -73,6 +73,7 @@ public:
|
||||
bool isUsingGlobalActiveIndex(size_t scalarResultIndex) const;
|
||||
bool hasFlowDiagUsableFluxes() const;
|
||||
|
||||
std::vector<QDateTime> timeStepDates() const;
|
||||
QDateTime timeStepDate(size_t scalarResultIndex, size_t timeStepIndex) const;
|
||||
std::vector<QDateTime> timeStepDates(size_t scalarResultIndex) const;
|
||||
int reportStepNumber(size_t scalarResultIndex, size_t timeStepIndex) const;
|
||||
|
||||
Reference in New Issue
Block a user