mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
@@ -558,7 +558,10 @@ RimWellLogExtractionCurve::WellLogExtractionCurveData
|
|||||||
//
|
//
|
||||||
// ************************************************
|
// ************************************************
|
||||||
|
|
||||||
RigEclipseResultAddress indexKResAdr( RiaResultNames::indexKResultName() );
|
RigEclipseResultAddress indexKResAdr( RiaDefines::ResultCatType::STATIC_NATIVE,
|
||||||
|
RiaResultNames::indexKResultName() );
|
||||||
|
eclipseCase->eclipseCaseData()->results( RiaDefines::PorosityModelType::MATRIX_MODEL )->ensureKnownResultLoaded( indexKResAdr );
|
||||||
|
|
||||||
cvf::ref<RigResultAccessor> indexKResAcc =
|
cvf::ref<RigResultAccessor> indexKResAcc =
|
||||||
RigResultAccessorFactory::createFromResultAddress( eclipseCase->eclipseCaseData(),
|
RigResultAccessorFactory::createFromResultAddress( eclipseCase->eclipseCaseData(),
|
||||||
0,
|
0,
|
||||||
|
|||||||
@@ -1124,9 +1124,16 @@ void RigCaseCellResultsData::createPlaceholderResultEntries()
|
|||||||
|
|
||||||
// I/J/K indexes
|
// I/J/K indexes
|
||||||
{
|
{
|
||||||
addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, RiaResultNames::indexIResultName(), false, 0 );
|
findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE,
|
||||||
addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, RiaResultNames::indexJResultName(), false, 0 );
|
RiaResultNames::indexIResultName() ),
|
||||||
addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, RiaResultNames::indexKResultName(), false, 0 );
|
false );
|
||||||
|
|
||||||
|
findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE,
|
||||||
|
RiaResultNames::indexJResultName() ),
|
||||||
|
false );
|
||||||
|
findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE,
|
||||||
|
RiaResultNames::indexKResultName() ),
|
||||||
|
false );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2036,71 +2043,48 @@ void RigCaseCellResultsData::computeIndexResults()
|
|||||||
size_t reservoirCellCount = activeCellInfo()->reservoirCellCount();
|
size_t reservoirCellCount = activeCellInfo()->reservoirCellCount();
|
||||||
if ( reservoirCellCount == 0 ) return;
|
if ( reservoirCellCount == 0 ) return;
|
||||||
|
|
||||||
size_t iResultIndex = findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE,
|
size_t iResultIndex = findScalarResultIndexFromAddress(
|
||||||
RiaResultNames::indexIResultName() ),
|
RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaResultNames::indexIResultName() ) );
|
||||||
false );
|
size_t jResultIndex = findScalarResultIndexFromAddress(
|
||||||
size_t jResultIndex = findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE,
|
RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaResultNames::indexJResultName() ) );
|
||||||
RiaResultNames::indexJResultName() ),
|
size_t kResultIndex = findScalarResultIndexFromAddress(
|
||||||
false );
|
RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaResultNames::indexKResultName() ) );
|
||||||
size_t kResultIndex = findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE,
|
|
||||||
RiaResultNames::indexKResultName() ),
|
if ( iResultIndex == cvf::UNDEFINED_SIZE_T || jResultIndex == cvf::UNDEFINED_SIZE_T ||
|
||||||
false );
|
kResultIndex == cvf::UNDEFINED_SIZE_T )
|
||||||
|
return;
|
||||||
|
|
||||||
bool computeIndexI = false;
|
bool computeIndexI = false;
|
||||||
bool computeIndexJ = false;
|
bool computeIndexJ = false;
|
||||||
bool computeIndexK = false;
|
bool computeIndexK = false;
|
||||||
|
|
||||||
if ( iResultIndex == cvf::UNDEFINED_SIZE_T )
|
|
||||||
{
|
|
||||||
iResultIndex = this->addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE,
|
|
||||||
RiaResultNames::indexIResultName(),
|
|
||||||
false,
|
|
||||||
reservoirCellCount );
|
|
||||||
computeIndexI = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( jResultIndex == cvf::UNDEFINED_SIZE_T )
|
|
||||||
{
|
|
||||||
jResultIndex = this->addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE,
|
|
||||||
RiaResultNames::indexJResultName(),
|
|
||||||
false,
|
|
||||||
reservoirCellCount );
|
|
||||||
computeIndexJ = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( kResultIndex == cvf::UNDEFINED_SIZE_T )
|
|
||||||
{
|
|
||||||
kResultIndex = this->addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE,
|
|
||||||
RiaResultNames::indexKResultName(),
|
|
||||||
false,
|
|
||||||
reservoirCellCount );
|
|
||||||
computeIndexK = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<std::vector<double>>& indexI = m_cellScalarResults[iResultIndex];
|
std::vector<std::vector<double>>& indexI = m_cellScalarResults[iResultIndex];
|
||||||
std::vector<std::vector<double>>& indexJ = m_cellScalarResults[jResultIndex];
|
std::vector<std::vector<double>>& indexJ = m_cellScalarResults[jResultIndex];
|
||||||
std::vector<std::vector<double>>& indexK = m_cellScalarResults[kResultIndex];
|
std::vector<std::vector<double>>& indexK = m_cellScalarResults[kResultIndex];
|
||||||
|
|
||||||
|
if ( indexI.empty() ) indexI.resize( 1 );
|
||||||
|
if ( indexI[0].size() < reservoirCellCount )
|
||||||
{
|
{
|
||||||
if ( indexI[0].size() < reservoirCellCount )
|
indexI[0].resize( reservoirCellCount, std::numeric_limits<double>::infinity() );
|
||||||
{
|
computeIndexI = true;
|
||||||
indexI[0].resize( reservoirCellCount, std::numeric_limits<double>::infinity() );
|
|
||||||
computeIndexI = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( indexJ[0].size() < reservoirCellCount )
|
|
||||||
{
|
|
||||||
indexJ[0].resize( reservoirCellCount, std::numeric_limits<double>::infinity() );
|
|
||||||
computeIndexJ = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( indexK[0].size() < reservoirCellCount )
|
|
||||||
{
|
|
||||||
indexK[0].resize( reservoirCellCount, std::numeric_limits<double>::infinity() );
|
|
||||||
computeIndexK = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( indexJ.empty() ) indexJ.resize( 1 );
|
||||||
|
if ( indexJ[0].size() < reservoirCellCount )
|
||||||
|
{
|
||||||
|
indexJ[0].resize( reservoirCellCount, std::numeric_limits<double>::infinity() );
|
||||||
|
computeIndexJ = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( indexK.empty() ) indexK.resize( 1 );
|
||||||
|
if ( indexK[0].size() < reservoirCellCount )
|
||||||
|
{
|
||||||
|
indexK[0].resize( reservoirCellCount, std::numeric_limits<double>::infinity() );
|
||||||
|
computeIndexK = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !( computeIndexI || computeIndexJ || computeIndexK ) ) return;
|
||||||
|
|
||||||
const std::vector<RigCell>& globalCellArray = m_ownerMainGrid->globalCellArray();
|
const std::vector<RigCell>& globalCellArray = m_ownerMainGrid->globalCellArray();
|
||||||
long long numCells = static_cast<long long>( globalCellArray.size() );
|
long long numCells = static_cast<long long>( globalCellArray.size() );
|
||||||
#pragma omp for
|
#pragma omp for
|
||||||
|
|||||||
Reference in New Issue
Block a user