mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Use the last frame for each timestep.
This commit is contained in:
parent
b169900c41
commit
ae7139e18d
@ -503,8 +503,8 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::findOrLoadScalarResult( i
|
|||||||
{
|
{
|
||||||
std::vector<double> frameTimes = m_readerInterface->frameTimes( stepIndex );
|
std::vector<double> frameTimes = m_readerInterface->frameTimes( stepIndex );
|
||||||
|
|
||||||
for ( int fIdx = 1; (size_t)fIdx < frameTimes.size() && fIdx < 2; ++fIdx ) // Read only the second frame
|
int fIdx = (int)( frameTimes.size() - 1 );
|
||||||
{
|
|
||||||
std::vector<std::vector<float>*> componentDataVectors;
|
std::vector<std::vector<float>*> componentDataVectors;
|
||||||
for ( auto& componentResult : resultsForEachComponent )
|
for ( auto& componentResult : resultsForEachComponent )
|
||||||
{
|
{
|
||||||
@ -533,7 +533,6 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::findOrLoadScalarResult( i
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
progress.incrementProgress();
|
progress.incrementProgress();
|
||||||
}
|
}
|
||||||
|
@ -168,7 +168,8 @@ bool RigGeoMechCaseData::readDisplacements( std::string* errorMessag
|
|||||||
#ifdef USE_ODB_API
|
#ifdef USE_ODB_API
|
||||||
if ( m_readerInterface.notNull() && m_readerInterface->isOpen() )
|
if ( m_readerInterface.notNull() && m_readerInterface->isOpen() )
|
||||||
{
|
{
|
||||||
m_readerInterface->readDisplacements( partId, timeStep, 1, displacements );
|
const auto& frames = m_readerInterface->frameTimes( timeStep );
|
||||||
|
m_readerInterface->readDisplacements( partId, timeStep, (int)frames.size() - 1, displacements );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,8 +250,8 @@ std::map<RifOdbReader::RifOdbResultKey, std::vector<std::string>> RifOdbReader::
|
|||||||
|
|
||||||
if ( stepFrames.size() > 1 )
|
if ( stepFrames.size() > 1 )
|
||||||
{
|
{
|
||||||
// Optimization: Get results metadata for the second frame of the first step only
|
// Optimization: Get results metadata for the last frame of the first step only
|
||||||
const odb_Frame& frame = stepFrames.constGet( 1 );
|
const odb_Frame& frame = stepFrames.constGet( stepFrames.size() - 1 );
|
||||||
|
|
||||||
const odb_FieldOutputRepository& fieldCon = frame.fieldOutputs();
|
const odb_FieldOutputRepository& fieldCon = frame.fieldOutputs();
|
||||||
odb_FieldOutputRepositoryIT fieldConIT( fieldCon );
|
odb_FieldOutputRepositoryIT fieldConIT( fieldCon );
|
||||||
|
Loading…
Reference in New Issue
Block a user