Save occupancy result.

This commit is contained in:
Kristian Bendiksen 2024-10-02 09:44:31 +02:00
parent b5cde7e883
commit 3351cacd33
2 changed files with 14 additions and 9 deletions

View File

@ -160,12 +160,9 @@ QList<caf::PdmOptionItemInfo> RimWellTargetCandidatesGenerator::calculateValueOp
}
else if ( fieldNeedingOptions == &m_timeStep )
{
auto ensemble = firstAncestorOrThisOfType<RimEclipseCaseEnsemble>();
if ( ensemble && !ensemble->cases().empty() )
if ( m_targetCase() )
{
RimEclipseCase* eclipseCase = ensemble->cases().front();
RimTools::timeStepsForCase( eclipseCase, &options );
RimTools::timeStepsForCase( m_targetCase(), &options );
}
}
@ -329,6 +326,9 @@ void RimWellTargetCandidatesGenerator::defineUiOrdering( QString uiConfigName, c
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigWellTargetCandidatesGenerator::ClusteringLimits RimWellTargetCandidatesGenerator::getClusteringLimits() const
{
RigWellTargetCandidatesGenerator::ClusteringLimits limits;

View File

@ -630,11 +630,14 @@ void RigWellTargetCandidatesGenerator::generateEnsembleCandidates( RimEclipseCas
std::vector<double> pressure( numGrids, std::numeric_limits<double>::infinity() );
for ( auto eclipseCase : ensemble.cases() )
{
const RigCaseCellResultsData* resultsData = eclipseCase->results( RiaDefines::PorosityModelType::MATRIX_MODEL );
const RigMainGrid* mainGrid = eclipseCase->mainGrid();
const RigActiveCellInfo* activeCellInfo = resultsData->activeCellInfo();
RigCaseCellResultsData* resultsData = eclipseCase->results( RiaDefines::PorosityModelType::MATRIX_MODEL );
const RigMainGrid* mainGrid = eclipseCase->mainGrid();
const RigActiveCellInfo* activeCellInfo = resultsData->activeCellInfo();
RigEclipseResultAddress pressureAddress( RiaDefines::ResultCatType::GENERATED, "CLUSTER_NUM" );
resultsData->ensureKnownResultLoaded( pressureAddress );
const std::vector<double>& clusterNum = resultsData->cellScalarResults( pressureAddress, timeStepIdx );
std::vector<double> clusterNum;
for ( size_t targetCellIdx = 0; targetCellIdx < targetNumReservoirCells; targetCellIdx++ )
{
const RigCell& nativeCell = targetCase.mainGrid()->globalCellArray()[targetCellIdx];
@ -651,4 +654,6 @@ void RigWellTargetCandidatesGenerator::generateEnsembleCandidates( RimEclipseCas
}
}
}
createResultVector( targetCase, "OCCUPANCY", occupancy );
}