mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4835 Python Cell Results : Not possible to write data if no dynamic data is present
This commit is contained in:
@@ -901,13 +901,12 @@ bool RifEclipseInputFileTools::readDataFromKeyword( ecl_kw_type* eclipseK
|
|||||||
RigEclipseResultAddress resAddr( RiaDefines::INPUT_PROPERTY, resultName );
|
RigEclipseResultAddress resAddr( RiaDefines::INPUT_PROPERTY, resultName );
|
||||||
caseData->results( RiaDefines::MATRIX_MODEL )->createResultEntry( resAddr, false );
|
caseData->results( RiaDefines::MATRIX_MODEL )->createResultEntry( resAddr, false );
|
||||||
|
|
||||||
std::vector<std::vector<double>>& newPropertyData = caseData->results( RiaDefines::MATRIX_MODEL )
|
auto newPropertyData = caseData->results( RiaDefines::MATRIX_MODEL )->modifiableCellScalarResultTimesteps( resAddr );
|
||||||
->modifiableCellScalarResultTimesteps( resAddr );
|
|
||||||
|
|
||||||
newPropertyData.push_back( std::vector<double>() );
|
newPropertyData->push_back( std::vector<double>() );
|
||||||
newPropertyData[0].resize( ecl_kw_get_size( eclipseKeywordData ), HUGE_VAL );
|
newPropertyData->at( 0 ).resize( ecl_kw_get_size( eclipseKeywordData ), HUGE_VAL );
|
||||||
|
|
||||||
ecl_kw_get_data_as_double( eclipseKeywordData, newPropertyData[0].data() );
|
ecl_kw_get_data_as_double( eclipseKeywordData, newPropertyData->at( 0 ).data() );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,8 +84,8 @@ bool RifReaderMockModel::open( const QString& fileName, RigEclipseCaseData* ecli
|
|||||||
RigEclipseResultAddress resAddr( RiaDefines::INPUT_PROPERTY, resultName ); \
|
RigEclipseResultAddress resAddr( RiaDefines::INPUT_PROPERTY, resultName ); \
|
||||||
cellResults->createResultEntry( resAddr, false ); \
|
cellResults->createResultEntry( resAddr, false ); \
|
||||||
cellResults->setTimeStepInfos( resAddr, staticResultTimeStepInfos ); \
|
cellResults->setTimeStepInfos( resAddr, staticResultTimeStepInfos ); \
|
||||||
cellResults->modifiableCellScalarResultTimesteps( resAddr ).resize( 1 ); \
|
cellResults->modifiableCellScalarResultTimesteps( resAddr )->resize( 1 ); \
|
||||||
std::vector<double>& values = cellResults->modifiableCellScalarResultTimesteps( resAddr )[0]; \
|
std::vector<double>& values = cellResults->modifiableCellScalarResultTimesteps( resAddr )->at( 0 ); \
|
||||||
this->inputProperty( resultName, &values ); \
|
this->inputProperty( resultName, &values ); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
#include "Rim3dView.h"
|
#include "Rim3dView.h"
|
||||||
#include "RimEclipseCase.h"
|
#include "RimEclipseCase.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
using namespace rips;
|
using namespace rips;
|
||||||
|
|
||||||
#define NUM_CONCURRENT_CLIENT_TO_SERVER_STREAMS 10
|
#define NUM_CONCURRENT_CLIENT_TO_SERVER_STREAMS 10
|
||||||
@@ -110,12 +112,14 @@ public:
|
|||||||
resultData->createResultEntry( m_resultAddress, true );
|
resultData->createResultEntry( m_resultAddress, true );
|
||||||
RigEclipseResultAddress addrToMaxTimeStepCountResult;
|
RigEclipseResultAddress addrToMaxTimeStepCountResult;
|
||||||
|
|
||||||
size_t timeStepCount = resultData->maxTimeStepCount( &addrToMaxTimeStepCountResult );
|
size_t timeStepCount = std::max( (size_t)1,
|
||||||
|
resultData->maxTimeStepCount( &addrToMaxTimeStepCountResult ) );
|
||||||
|
|
||||||
const std::vector<RigEclipseTimeStepInfo> timeStepInfos = resultData->timeStepInfos(
|
const std::vector<RigEclipseTimeStepInfo> timeStepInfos = resultData->timeStepInfos(
|
||||||
addrToMaxTimeStepCountResult );
|
addrToMaxTimeStepCountResult );
|
||||||
resultData->setTimeStepInfos( m_resultAddress, timeStepInfos );
|
resultData->setTimeStepInfos( m_resultAddress, timeStepInfos );
|
||||||
auto scalarResultFrames = resultData->modifiableCellScalarResultTimesteps( m_resultAddress );
|
auto scalarResultFrames = resultData->modifiableCellScalarResultTimesteps( m_resultAddress );
|
||||||
scalarResultFrames.resize( timeStepCount );
|
scalarResultFrames->resize( timeStepCount );
|
||||||
if ( timeStep < resultData->timeStepCount( m_resultAddress ) )
|
if ( timeStep < resultData->timeStepCount( m_resultAddress ) )
|
||||||
{
|
{
|
||||||
initResultAccess( caseData, request->grid_index(), m_porosityModel, timeStep, m_resultAddress );
|
initResultAccess( caseData, request->grid_index(), m_porosityModel, timeStep, m_resultAddress );
|
||||||
@@ -243,7 +247,7 @@ protected:
|
|||||||
RigEclipseResultAddress resVarAddr ) override
|
RigEclipseResultAddress resVarAddr ) override
|
||||||
{
|
{
|
||||||
auto activeCellInfo = caseData->activeCellInfo( porosityModel );
|
auto activeCellInfo = caseData->activeCellInfo( porosityModel );
|
||||||
m_resultValues = &( caseData->results( porosityModel )->modifiableCellScalarResult( resVarAddr, timeStepIndex ) );
|
m_resultValues = caseData->results( porosityModel )->modifiableCellScalarResult( resVarAddr, timeStepIndex );
|
||||||
if ( m_resultValues->empty() )
|
if ( m_resultValues->empty() )
|
||||||
{
|
{
|
||||||
m_resultValues->resize( activeCellInfo->reservoirCellResultCount() );
|
m_resultValues->resize( activeCellInfo->reservoirCellResultCount() );
|
||||||
|
|||||||
@@ -56,13 +56,13 @@ void RimEclipseStatisticsCaseEvaluator::addNamedResult( RigCaseCellResultsData*
|
|||||||
destinationCellResults->createResultEntry( resAddr, true );
|
destinationCellResults->createResultEntry( resAddr, true );
|
||||||
|
|
||||||
destinationCellResults->setTimeStepInfos( resAddr, sourceTimeStepInfos );
|
destinationCellResults->setTimeStepInfos( resAddr, sourceTimeStepInfos );
|
||||||
std::vector<std::vector<double>>& dataValues = destinationCellResults->modifiableCellScalarResultTimesteps( resAddr );
|
std::vector<std::vector<double>>* dataValues = destinationCellResults->modifiableCellScalarResultTimesteps( resAddr );
|
||||||
dataValues.resize( sourceTimeStepInfos.size() );
|
dataValues->resize( sourceTimeStepInfos.size() );
|
||||||
|
|
||||||
// Initializes the size of the destination dataset to active union cell count
|
// Initializes the size of the destination dataset to active union cell count
|
||||||
for ( size_t i = 0; i < sourceTimeStepInfos.size(); i++ )
|
for ( size_t i = 0; i < sourceTimeStepInfos.size(); i++ )
|
||||||
{
|
{
|
||||||
dataValues[i].resize( activeUnionCellCount, HUGE_VAL );
|
dataValues->at( i ).resize( activeUnionCellCount, HUGE_VAL );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -285,9 +285,7 @@ void RimReservoirCellResultsStorage::setCellResults( RigCaseCellResultsData* cel
|
|||||||
|
|
||||||
for ( size_t tsIdx = 0; tsIdx < resInfo->m_timeStepDates().size(); ++tsIdx )
|
for ( size_t tsIdx = 0; tsIdx < resInfo->m_timeStepDates().size(); ++tsIdx )
|
||||||
{
|
{
|
||||||
std::vector<double>* data = nullptr;
|
std::vector<double>* data = m_cellResults->modifiableCellScalarResult( resAddr, tsIdx );
|
||||||
|
|
||||||
data = &( m_cellResults->modifiableCellScalarResult( resAddr, tsIdx ) );
|
|
||||||
|
|
||||||
quint64 cellCount = 0;
|
quint64 cellCount = 0;
|
||||||
stream >> cellCount;
|
stream >> cellCount;
|
||||||
|
|||||||
@@ -112,13 +112,13 @@ bool RigCaseCellResultCalculator::computeDifference( RigEclipseCaseData*
|
|||||||
// Initialize difference result with infinity for correct number of time steps and values per time step
|
// Initialize difference result with infinity for correct number of time steps and values per time step
|
||||||
{
|
{
|
||||||
const std::vector<std::vector<double>>& srcFrames = sourceCaseResults->cellScalarResults( nativeAddress );
|
const std::vector<std::vector<double>>& srcFrames = sourceCaseResults->cellScalarResults( nativeAddress );
|
||||||
std::vector<std::vector<double>>& diffResultFrames = sourceCaseResults->modifiableCellScalarResultTimesteps(
|
std::vector<std::vector<double>>* diffResultFrames = sourceCaseResults->modifiableCellScalarResultTimesteps(
|
||||||
address );
|
address );
|
||||||
diffResultFrames.resize( srcFrames.size() );
|
diffResultFrames->resize( srcFrames.size() );
|
||||||
for ( size_t fIdx = 0; fIdx < srcFrames.size(); ++fIdx )
|
for ( size_t fIdx = 0; fIdx < srcFrames.size(); ++fIdx )
|
||||||
{
|
{
|
||||||
const std::vector<double>& srcVals = srcFrames[fIdx];
|
const std::vector<double>& srcVals = srcFrames[fIdx];
|
||||||
std::vector<double>& dstVals = diffResultFrames[fIdx];
|
std::vector<double>& dstVals = diffResultFrames->at( fIdx );
|
||||||
|
|
||||||
dstVals.resize( srcVals.size(), std::numeric_limits<double>::infinity() );
|
dstVals.resize( srcVals.size(), std::numeric_limits<double>::infinity() );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -249,20 +249,20 @@ const std::vector<std::vector<double>>&
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::vector<std::vector<double>>&
|
std::vector<std::vector<double>>*
|
||||||
RigCaseCellResultsData::modifiableCellScalarResultTimesteps( const RigEclipseResultAddress& resVarAddr )
|
RigCaseCellResultsData::modifiableCellScalarResultTimesteps( const RigEclipseResultAddress& resVarAddr )
|
||||||
{
|
{
|
||||||
size_t scalarResultIndex = findScalarResultIndexFromAddress( resVarAddr );
|
size_t scalarResultIndex = findScalarResultIndexFromAddress( resVarAddr );
|
||||||
|
|
||||||
CVF_TIGHT_ASSERT( scalarResultIndex < resultCount() );
|
CVF_TIGHT_ASSERT( scalarResultIndex < resultCount() );
|
||||||
|
|
||||||
return m_cellScalarResults[scalarResultIndex];
|
return &( m_cellScalarResults[scalarResultIndex] );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::vector<double>& RigCaseCellResultsData::modifiableCellScalarResult( const RigEclipseResultAddress& resVarAddr,
|
std::vector<double>* RigCaseCellResultsData::modifiableCellScalarResult( const RigEclipseResultAddress& resVarAddr,
|
||||||
size_t timeStepIndex )
|
size_t timeStepIndex )
|
||||||
{
|
{
|
||||||
size_t scalarResultIndex = findScalarResultIndexFromAddress( resVarAddr );
|
size_t scalarResultIndex = findScalarResultIndexFromAddress( resVarAddr );
|
||||||
@@ -270,7 +270,7 @@ std::vector<double>& RigCaseCellResultsData::modifiableCellScalarResult( const R
|
|||||||
CVF_TIGHT_ASSERT( scalarResultIndex < resultCount() );
|
CVF_TIGHT_ASSERT( scalarResultIndex < resultCount() );
|
||||||
CVF_TIGHT_ASSERT( timeStepIndex < m_cellScalarResults[scalarResultIndex].size() );
|
CVF_TIGHT_ASSERT( timeStepIndex < m_cellScalarResults[scalarResultIndex].size() );
|
||||||
|
|
||||||
return m_cellScalarResults[scalarResultIndex][timeStepIndex];
|
return &( m_cellScalarResults[scalarResultIndex][timeStepIndex] );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -609,8 +609,8 @@ void RigCaseCellResultsData::setTimeStepInfos( const RigEclipseResultAddress&
|
|||||||
|
|
||||||
m_resultInfos[findScalarResultIndexFromAddress( resVarAddr )].setTimeStepInfos( timeStepInfos );
|
m_resultInfos[findScalarResultIndexFromAddress( resVarAddr )].setTimeStepInfos( timeStepInfos );
|
||||||
|
|
||||||
std::vector<std::vector<double>>& dataValues = this->modifiableCellScalarResultTimesteps( resVarAddr );
|
std::vector<std::vector<double>>* dataValues = this->modifiableCellScalarResultTimesteps( resVarAddr );
|
||||||
dataValues.resize( timeStepInfos.size() );
|
dataValues->resize( timeStepInfos.size() );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -1605,7 +1605,7 @@ void RigCaseCellResultsData::computeSOILForTimeStep( size_t timeStepIndex )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<double>& soilForTimeStep = this->modifiableCellScalarResult( SOILAddr, timeStepIndex );
|
std::vector<double>* soilForTimeStep = this->modifiableCellScalarResult( SOILAddr, timeStepIndex );
|
||||||
|
|
||||||
#pragma omp parallel for
|
#pragma omp parallel for
|
||||||
for ( int idx = 0; idx < static_cast<int>( soilResultValueCount ); idx++ )
|
for ( int idx = 0; idx < static_cast<int>( soilResultValueCount ); idx++ )
|
||||||
@@ -1626,7 +1626,7 @@ void RigCaseCellResultsData::computeSOILForTimeStep( size_t timeStepIndex )
|
|||||||
soilValue -= ssolForTimeStep->at( idx );
|
soilValue -= ssolForTimeStep->at( idx );
|
||||||
}
|
}
|
||||||
|
|
||||||
soilForTimeStep[idx] = soilValue;
|
soilForTimeStep->at( idx ) = soilValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2802,7 +2802,7 @@ void RigCaseCellResultsData::setActiveFormationNames( RigFormationNames* activeF
|
|||||||
false,
|
false,
|
||||||
totalGlobCellCount );
|
totalGlobCellCount );
|
||||||
|
|
||||||
std::vector<double>& fnData =
|
std::vector<double>* fnData =
|
||||||
this->modifiableCellScalarResult( RigEclipseResultAddress( RiaDefines::FORMATION_NAMES,
|
this->modifiableCellScalarResult( RigEclipseResultAddress( RiaDefines::FORMATION_NAMES,
|
||||||
RiaDefines::activeFormationNamesResultName() ),
|
RiaDefines::activeFormationNamesResultName() ),
|
||||||
0 );
|
0 );
|
||||||
@@ -2811,7 +2811,7 @@ void RigCaseCellResultsData::setActiveFormationNames( RigFormationNames* activeF
|
|||||||
{
|
{
|
||||||
for ( size_t cIdx = 0; cIdx < totalGlobCellCount; ++cIdx )
|
for ( size_t cIdx = 0; cIdx < totalGlobCellCount; ++cIdx )
|
||||||
{
|
{
|
||||||
fnData[cIdx] = HUGE_VAL;
|
fnData->at( cIdx ) = HUGE_VAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -2827,11 +2827,11 @@ void RigCaseCellResultsData::setActiveFormationNames( RigFormationNames* activeF
|
|||||||
int formNameIdx = activeFormationNames->formationIndexFromKLayerIdx( k );
|
int formNameIdx = activeFormationNames->formationIndexFromKLayerIdx( k );
|
||||||
if ( formNameIdx != -1 )
|
if ( formNameIdx != -1 )
|
||||||
{
|
{
|
||||||
fnData[cIdx] = formNameIdx;
|
fnData->at( cIdx ) = formNameIdx;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fnData[cIdx] = HUGE_VAL;
|
fnData->at( cIdx ) = HUGE_VAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2846,11 +2846,11 @@ void RigCaseCellResultsData::setActiveFormationNames( RigFormationNames* activeF
|
|||||||
int formNameIdx = activeFormationNames->formationIndexFromKLayerIdx( k );
|
int formNameIdx = activeFormationNames->formationIndexFromKLayerIdx( k );
|
||||||
if ( formNameIdx != -1 )
|
if ( formNameIdx != -1 )
|
||||||
{
|
{
|
||||||
fnData[cIdx] = formNameIdx;
|
fnData->at( cIdx ) = formNameIdx;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fnData[cIdx] = HUGE_VAL;
|
fnData->at( cIdx ) = HUGE_VAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3064,9 +3064,9 @@ void RigCaseCellResultsData::copyResultsMetaDataFromMainCase( RigEclipseCaseData
|
|||||||
|
|
||||||
cellResultsStorage->setTimeStepInfos( resVarAddr, timeStepInfos );
|
cellResultsStorage->setTimeStepInfos( resVarAddr, timeStepInfos );
|
||||||
|
|
||||||
std::vector<std::vector<double>>& dataValues = cellResultsStorage->modifiableCellScalarResultTimesteps(
|
std::vector<std::vector<double>>* dataValues = cellResultsStorage->modifiableCellScalarResultTimesteps(
|
||||||
resVarAddr );
|
resVarAddr );
|
||||||
dataValues.resize( timeStepInfos.size() );
|
dataValues->resize( timeStepInfos.size() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,8 +68,8 @@ public:
|
|||||||
|
|
||||||
const std::vector<std::vector<double>>& cellScalarResults( const RigEclipseResultAddress& resVarAddr ) const;
|
const std::vector<std::vector<double>>& cellScalarResults( const RigEclipseResultAddress& resVarAddr ) const;
|
||||||
const std::vector<double>& cellScalarResults( const RigEclipseResultAddress& resVarAddr, size_t timeStepIndex ) const;
|
const std::vector<double>& cellScalarResults( const RigEclipseResultAddress& resVarAddr, size_t timeStepIndex ) const;
|
||||||
std::vector<std::vector<double>>& modifiableCellScalarResultTimesteps( const RigEclipseResultAddress& resVarAddr );
|
std::vector<std::vector<double>>* modifiableCellScalarResultTimesteps( const RigEclipseResultAddress& resVarAddr );
|
||||||
std::vector<double>& modifiableCellScalarResult( const RigEclipseResultAddress& resVarAddr, size_t timeStepIndex );
|
std::vector<double>* modifiableCellScalarResult( const RigEclipseResultAddress& resVarAddr, size_t timeStepIndex );
|
||||||
|
|
||||||
bool isUsingGlobalActiveIndex( const RigEclipseResultAddress& resVarAddr ) const;
|
bool isUsingGlobalActiveIndex( const RigEclipseResultAddress& resVarAddr ) const;
|
||||||
|
|
||||||
|
|||||||
@@ -52,18 +52,17 @@ cvf::ref<RigResultModifier> RigResultModifierFactory::createResultModifier( RigE
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::vector<double>>& scalarSetResults = eclipseCase->results( porosityModel )
|
auto scalarSetResults = eclipseCase->results( porosityModel )->modifiableCellScalarResultTimesteps( resVarAddr );
|
||||||
->modifiableCellScalarResultTimesteps( resVarAddr );
|
|
||||||
|
|
||||||
if ( timeStepIndex >= scalarSetResults.size() )
|
if ( timeStepIndex >= scalarSetResults->size() )
|
||||||
{
|
{
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<double>* resultValues = nullptr;
|
std::vector<double>* resultValues = nullptr;
|
||||||
if ( timeStepIndex < scalarSetResults.size() )
|
if ( timeStepIndex < scalarSetResults->size() )
|
||||||
{
|
{
|
||||||
resultValues = &( scalarSetResults[timeStepIndex] );
|
resultValues = &( scalarSetResults->at( timeStepIndex ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool useGlobalActiveIndex = eclipseCase->results( porosityModel )->isUsingGlobalActiveIndex( resVarAddr );
|
bool useGlobalActiveIndex = eclipseCase->results( porosityModel )->isUsingGlobalActiveIndex( resVarAddr );
|
||||||
|
|||||||
@@ -466,8 +466,7 @@ private:
|
|||||||
results->createResultEntry( resAddr, true );
|
results->createResultEntry( resAddr, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::vector<double>>* scalarResultFrames = nullptr;
|
std::vector<std::vector<double>>* scalarResultFrames = results->modifiableCellScalarResultTimesteps( resAddr );
|
||||||
scalarResultFrames = &( results->modifiableCellScalarResultTimesteps( resAddr ) );
|
|
||||||
size_t timeStepCount = results->maxTimeStepCount();
|
size_t timeStepCount = results->maxTimeStepCount();
|
||||||
scalarResultFrames->resize( timeStepCount );
|
scalarResultFrames->resize( timeStepCount );
|
||||||
|
|
||||||
|
|||||||
@@ -79,9 +79,8 @@ public:
|
|||||||
{
|
{
|
||||||
if ( rimCase->results( porosityModelEnum )->ensureKnownResultLoaded( RigEclipseResultAddress( propertyName ) ) )
|
if ( rimCase->results( porosityModelEnum )->ensureKnownResultLoaded( RigEclipseResultAddress( propertyName ) ) )
|
||||||
{
|
{
|
||||||
scalarResultFrames = &(
|
scalarResultFrames = rimCase->results( porosityModelEnum )
|
||||||
rimCase->results( porosityModelEnum )
|
->modifiableCellScalarResultTimesteps( RigEclipseResultAddress( propertyName ) );
|
||||||
->modifiableCellScalarResultTimesteps( RigEclipseResultAddress( propertyName ) ) );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -449,8 +448,7 @@ public:
|
|||||||
rimCase->results( m_porosityModelEnum )->setTimeStepInfos( eclResAddr, timeStepInfos );
|
rimCase->results( m_porosityModelEnum )->setTimeStepInfos( eclResAddr, timeStepInfos );
|
||||||
}
|
}
|
||||||
|
|
||||||
scalarResultFrames = &(
|
scalarResultFrames = rimCase->results( m_porosityModelEnum )->modifiableCellScalarResultTimesteps( eclResAddr );
|
||||||
rimCase->results( m_porosityModelEnum )->modifiableCellScalarResultTimesteps( eclResAddr ) );
|
|
||||||
size_t timeStepCount = rimCase->results( m_porosityModelEnum )->maxTimeStepCount();
|
size_t timeStepCount = rimCase->results( m_porosityModelEnum )->maxTimeStepCount();
|
||||||
scalarResultFrames->resize( timeStepCount );
|
scalarResultFrames->resize( timeStepCount );
|
||||||
|
|
||||||
@@ -703,9 +701,10 @@ public:
|
|||||||
// Adjust the result data if only one time step is requested so the result behaves like a static result
|
// Adjust the result data if only one time step is requested so the result behaves like a static result
|
||||||
if ( m_requestedTimesteps.size() == 1 && m_currentEclResultAddress.isValid() )
|
if ( m_requestedTimesteps.size() == 1 && m_currentEclResultAddress.isValid() )
|
||||||
{
|
{
|
||||||
std::vector<std::vector<double>>* scalarResultFrames = nullptr;
|
std::vector<std::vector<double>>* scalarResultFrames = m_currentReservoir
|
||||||
scalarResultFrames = &( m_currentReservoir->results( m_porosityModelEnum )
|
->results( m_porosityModelEnum )
|
||||||
->modifiableCellScalarResultTimesteps( m_currentEclResultAddress ) );
|
->modifiableCellScalarResultTimesteps(
|
||||||
|
m_currentEclResultAddress );
|
||||||
size_t lastIndexWithDataPresent = cvf::UNDEFINED_SIZE_T;
|
size_t lastIndexWithDataPresent = cvf::UNDEFINED_SIZE_T;
|
||||||
for ( size_t i = 0; i < scalarResultFrames->size(); i++ )
|
for ( size_t i = 0; i < scalarResultFrames->size(); i++ )
|
||||||
{
|
{
|
||||||
@@ -866,8 +865,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_currentResultAddress = resAddr;
|
m_currentResultAddress = resAddr;
|
||||||
scalarResultFrames = &(
|
scalarResultFrames = rimCase->results( m_porosityModelEnum )
|
||||||
rimCase->results( m_porosityModelEnum )->modifiableCellScalarResultTimesteps( m_currentResultAddress ) );
|
->modifiableCellScalarResultTimesteps( m_currentResultAddress );
|
||||||
size_t timeStepCount = rimCase->results( m_porosityModelEnum )->maxTimeStepCount();
|
size_t timeStepCount = rimCase->results( m_porosityModelEnum )->maxTimeStepCount();
|
||||||
scalarResultFrames->resize( timeStepCount );
|
scalarResultFrames->resize( timeStepCount );
|
||||||
|
|
||||||
@@ -1093,10 +1092,10 @@ public:
|
|||||||
// Adjust the result data if only one time step is requested so the result behaves like a static result
|
// Adjust the result data if only one time step is requested so the result behaves like a static result
|
||||||
if ( m_requestedTimesteps.size() == 1 && m_currentResultAddress.isValid() )
|
if ( m_requestedTimesteps.size() == 1 && m_currentResultAddress.isValid() )
|
||||||
{
|
{
|
||||||
std::vector<std::vector<double>>* scalarResultFrames = nullptr;
|
auto scalarResultFrames = m_currentReservoir->results( m_porosityModelEnum )
|
||||||
scalarResultFrames = &( m_currentReservoir->results( m_porosityModelEnum )
|
|
||||||
->modifiableCellScalarResultTimesteps(
|
->modifiableCellScalarResultTimesteps(
|
||||||
RigEclipseResultAddress( m_currentResultAddress ) ) );
|
RigEclipseResultAddress( m_currentResultAddress ) );
|
||||||
|
|
||||||
size_t lastIndexWithDataPresent = cvf::UNDEFINED_SIZE_T;
|
size_t lastIndexWithDataPresent = cvf::UNDEFINED_SIZE_T;
|
||||||
for ( size_t i = 0; i < scalarResultFrames->size(); i++ )
|
for ( size_t i = 0; i < scalarResultFrames->size(); i++ )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user