mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 15:10:22 -05:00
#14752 Well Target Mapping: use view-independent data filters
This commit is contained in:
1 parent
53ec9dfe4d
commit
0eba9e8ef7
6 files changed
+312
-43
No files matched your search
@@ -40,6 +40,7 @@
|
||||
#include "RigNNCData.h"
|
||||
#include "RigStatisticsMath.h"
|
||||
|
||||
#include "RimCellFilterTools.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimProject.h"
|
||||
@@ -146,9 +147,32 @@ void RigWellTargetMapping::generateCandidates( RimEclipseCase* eclips
|
||||
}
|
||||
|
||||
std::vector<double> filterVector;
|
||||
if ( !limits.filter.empty() )
|
||||
if ( limits.dataFilter )
|
||||
{
|
||||
filterVector = limits.filter;
|
||||
// Evaluate for each realization after opening its grid, using the mapping's time step.
|
||||
auto visibility = RimCellFilterTools::computeReservoirCellVisibility( limits.dataFilter, eclipseCase, timeStepIdx );
|
||||
if ( visibility.notNull() )
|
||||
{
|
||||
auto activeReservoirCellIndices =
|
||||
caseData->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL )->activeReservoirCellIndices();
|
||||
const int numActiveCells = static_cast<int>( activeReservoirCellIndices.size() );
|
||||
filterVector.resize( numActiveCells );
|
||||
|
||||
// Convert reservoir visibility to the active-cell indexing used by clustering.
|
||||
#pragma omp parallel for
|
||||
for ( int i = 0; i < numActiveCells; i++ )
|
||||
{
|
||||
filterVector[i] = visibility->val( activeReservoirCellIndices[i].value() ) ? 1.0 : 0.0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fall through to the unfiltered path below so all realizations in an ensemble get a result,
|
||||
// consistent with how an invalid filterAddress is handled.
|
||||
RiaLogging::warning(
|
||||
std::format( "Unable to evaluate well target mapping data filter for case '{}'. Continuing without filter.",
|
||||
eclipseCase->caseUserDescription().toStdString() ) );
|
||||
}
|
||||
}
|
||||
else if ( limits.filterAddress.isValid() )
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
class RigCaseCellResultsData;
|
||||
class RimEclipseCase;
|
||||
class RimCellFilter;
|
||||
class RimRegularGridCase;
|
||||
class RigFloodingSettings;
|
||||
|
||||
@@ -67,7 +68,7 @@ public:
|
||||
int maxNumTargets;
|
||||
int maxIterations;
|
||||
RigEclipseResultAddress filterAddress;
|
||||
std::vector<double> filter;
|
||||
RimCellFilter* dataFilter = nullptr;
|
||||
};
|
||||
|
||||
static void generateCandidates( RimEclipseCase* eclipseCase,
|
||||
|
||||
Reference in new issue
Block a user