mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Refactor: improve names of result aggregation enum options.
This commit is contained in:
@@ -344,15 +344,15 @@ QList<caf::PdmOptionItemInfo> RimGeoMechContourMapProjection::calculateValueOpti
|
||||
|
||||
if ( fieldNeedingOptions == &m_resultAggregation )
|
||||
{
|
||||
std::vector<RigContourMapCalculator::ResultAggregationEnum> validOptions = { RigContourMapCalculator::RESULTS_TOP_VALUE,
|
||||
RigContourMapCalculator::RESULTS_MEAN_VALUE,
|
||||
RigContourMapCalculator::RESULTS_GEOM_VALUE,
|
||||
RigContourMapCalculator::RESULTS_HARM_VALUE,
|
||||
RigContourMapCalculator::RESULTS_MIN_VALUE,
|
||||
RigContourMapCalculator::RESULTS_MAX_VALUE,
|
||||
RigContourMapCalculator::RESULTS_SUM };
|
||||
std::vector<RigContourMapCalculator::ResultAggregationType> validOptions = { RigContourMapCalculator::TOP_VALUE,
|
||||
RigContourMapCalculator::MEAN,
|
||||
RigContourMapCalculator::GEOMETRIC_MEAN,
|
||||
RigContourMapCalculator::HARMONIC_MEAN,
|
||||
RigContourMapCalculator::MIN_VALUE,
|
||||
RigContourMapCalculator::MAX_VALUE,
|
||||
RigContourMapCalculator::SUM };
|
||||
|
||||
for ( RigContourMapCalculator::ResultAggregationEnum option : validOptions )
|
||||
for ( RigContourMapCalculator::ResultAggregationType option : validOptions )
|
||||
{
|
||||
options.push_back( caf::PdmOptionItemInfo( ResultAggregation::uiText( option ), option ) );
|
||||
}
|
||||
|
@@ -49,21 +49,21 @@ namespace caf
|
||||
template <>
|
||||
void RimContourMapProjection::ResultAggregation::setUp()
|
||||
{
|
||||
addItem( RigContourMapCalculator::RESULTS_OIL_COLUMN, "OIL_COLUMN", "Oil Column" );
|
||||
addItem( RigContourMapCalculator::RESULTS_GAS_COLUMN, "GAS_COLUMN", "Gas Column" );
|
||||
addItem( RigContourMapCalculator::RESULTS_HC_COLUMN, "HC_COLUMN", "Hydrocarbon Column" );
|
||||
addItem( RigContourMapCalculator::OIL_COLUMN, "OIL_COLUMN", "Oil Column" );
|
||||
addItem( RigContourMapCalculator::GAS_COLUMN, "GAS_COLUMN", "Gas Column" );
|
||||
addItem( RigContourMapCalculator::HYDROCARBON_COLUMN, "HC_COLUMN", "Hydrocarbon Column" );
|
||||
|
||||
addItem( RigContourMapCalculator::RESULTS_MEAN_VALUE, "MEAN_VALUE", "Arithmetic Mean" );
|
||||
addItem( RigContourMapCalculator::RESULTS_HARM_VALUE, "HARM_VALUE", "Harmonic Mean" );
|
||||
addItem( RigContourMapCalculator::RESULTS_GEOM_VALUE, "GEOM_VALUE", "Geometric Mean" );
|
||||
addItem( RigContourMapCalculator::RESULTS_VOLUME_SUM, "VOLUME_SUM", "Volume Weighted Sum" );
|
||||
addItem( RigContourMapCalculator::RESULTS_SUM, "SUM", "Sum" );
|
||||
addItem( RigContourMapCalculator::MEAN, "MEAN_VALUE", "Arithmetic Mean" );
|
||||
addItem( RigContourMapCalculator::HARMONIC_MEAN, "HARM_VALUE", "Harmonic Mean" );
|
||||
addItem( RigContourMapCalculator::GEOMETRIC_MEAN, "GEOM_VALUE", "Geometric Mean" );
|
||||
addItem( RigContourMapCalculator::VOLUME_SUM, "VOLUME_SUM", "Volume Weighted Sum" );
|
||||
addItem( RigContourMapCalculator::SUM, "SUM", "Sum" );
|
||||
|
||||
addItem( RigContourMapCalculator::RESULTS_TOP_VALUE, "TOP_VALUE", "Top Value" );
|
||||
addItem( RigContourMapCalculator::RESULTS_MIN_VALUE, "MIN_VALUE", "Min Value" );
|
||||
addItem( RigContourMapCalculator::RESULTS_MAX_VALUE, "MAX_VALUE", "Max Value" );
|
||||
addItem( RigContourMapCalculator::TOP_VALUE, "TOP_VALUE", "Top Value" );
|
||||
addItem( RigContourMapCalculator::MIN_VALUE, "MIN_VALUE", "Min Value" );
|
||||
addItem( RigContourMapCalculator::MAX_VALUE, "MAX_VALUE", "Max Value" );
|
||||
|
||||
setDefault( RigContourMapCalculator::RESULTS_MEAN_VALUE );
|
||||
setDefault( RigContourMapCalculator::MEAN );
|
||||
}
|
||||
} // namespace caf
|
||||
|
||||
@@ -883,7 +883,7 @@ void RimContourMapProjection::fieldChangedByUi( const caf::PdmFieldHandle* chang
|
||||
{
|
||||
if ( changedField == &m_resultAggregation )
|
||||
{
|
||||
ResultAggregation previousAggregation = static_cast<RigContourMapCalculator::ResultAggregationEnum>( oldValue.toInt() );
|
||||
ResultAggregation previousAggregation = static_cast<RigContourMapCalculator::ResultAggregationType>( oldValue.toInt() );
|
||||
if ( RigContourMapCalculator::isStraightSummationResult( previousAggregation ) != isStraightSummationResult() )
|
||||
{
|
||||
clearGridMapping();
|
||||
|
@@ -43,7 +43,7 @@ class RimContourMapProjection : public RimCheckableNamedObject
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
using ResultAggregation = caf::AppEnum<RigContourMapCalculator::ResultAggregationEnum>;
|
||||
using ResultAggregation = caf::AppEnum<RigContourMapCalculator::ResultAggregationType>;
|
||||
using ContourPolygons = std::vector<RigContourPolygonsTools::ContourPolygon>;
|
||||
|
||||
RimContourMapProjection();
|
||||
|
@@ -151,7 +151,7 @@ void RimStatisticsContourMap::computeStatistics()
|
||||
firstEclipseCase->ensureReservoirCaseIsOpen();
|
||||
|
||||
int timeStep = 0;
|
||||
RigContourMapCalculator::ResultAggregationEnum resultAggregation = RigContourMapCalculator::ResultAggregationEnum::RESULTS_MEAN_VALUE;
|
||||
RigContourMapCalculator::ResultAggregationType resultAggregation = RigContourMapCalculator::ResultAggregationType::MEAN;
|
||||
|
||||
cvf::BoundingBox gridBoundingBox = firstEclipseCase->activeCellsBoundingBox();
|
||||
|
||||
|
@@ -36,29 +36,29 @@
|
||||
double RigContourMapCalculator::calculateValueInMapCell( const RigContourMapProjection& contourMapProjection,
|
||||
const std::vector<std::pair<size_t, double>>& matchingCells,
|
||||
const std::vector<double>& gridCellValues,
|
||||
ResultAggregationEnum resultAggregation )
|
||||
ResultAggregationType resultAggregation )
|
||||
{
|
||||
if ( matchingCells.empty() ) return std::numeric_limits<double>::infinity();
|
||||
|
||||
switch ( resultAggregation )
|
||||
{
|
||||
case RESULTS_TOP_VALUE:
|
||||
case TOP_VALUE:
|
||||
return calculateTopValue( contourMapProjection, matchingCells, gridCellValues );
|
||||
case RESULTS_MEAN_VALUE:
|
||||
case MEAN:
|
||||
return calculateMeanValue( contourMapProjection, matchingCells, gridCellValues );
|
||||
case RESULTS_GEOM_VALUE:
|
||||
case GEOMETRIC_MEAN:
|
||||
return calculateGeometricMeanValue( contourMapProjection, matchingCells, gridCellValues );
|
||||
case RESULTS_HARM_VALUE:
|
||||
case HARMONIC_MEAN:
|
||||
return calculateHarmonicMeanValue( contourMapProjection, matchingCells, gridCellValues );
|
||||
case RESULTS_MAX_VALUE:
|
||||
case MAX_VALUE:
|
||||
return calculateMaxValue( contourMapProjection, matchingCells, gridCellValues );
|
||||
case RESULTS_MIN_VALUE:
|
||||
case MIN_VALUE:
|
||||
return calculateMinValue( contourMapProjection, matchingCells, gridCellValues );
|
||||
case RESULTS_VOLUME_SUM:
|
||||
case RESULTS_SUM:
|
||||
case RESULTS_OIL_COLUMN:
|
||||
case RESULTS_GAS_COLUMN:
|
||||
case RESULTS_HC_COLUMN:
|
||||
case VOLUME_SUM:
|
||||
case SUM:
|
||||
case OIL_COLUMN:
|
||||
case GAS_COLUMN:
|
||||
case HYDROCARBON_COLUMN:
|
||||
return calculateSum( contourMapProjection, matchingCells, gridCellValues );
|
||||
default:
|
||||
{
|
||||
@@ -227,7 +227,7 @@ double RigContourMapCalculator::calculateSum( const RigContourMapProjection&
|
||||
std::vector<std::vector<std::pair<size_t, double>>>
|
||||
RigContourMapCalculator::generateGridMapping( RigContourMapProjection& contourMapProjection,
|
||||
const RigContourMapGrid& contourMapGrid,
|
||||
ResultAggregationEnum resultAggregation,
|
||||
ResultAggregationType resultAggregation,
|
||||
const std::vector<double>& weightingResultValues )
|
||||
{
|
||||
int nCells = contourMapGrid.numberOfCells();
|
||||
@@ -392,24 +392,23 @@ std::vector<RigContourMapCalculator::CellIndexAndResult>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigContourMapCalculator::isColumnResult( ResultAggregationEnum aggregationType )
|
||||
bool RigContourMapCalculator::isColumnResult( ResultAggregationType aggregationType )
|
||||
{
|
||||
return aggregationType == RESULTS_OIL_COLUMN || aggregationType == RESULTS_GAS_COLUMN || aggregationType == RESULTS_HC_COLUMN;
|
||||
return aggregationType == OIL_COLUMN || aggregationType == GAS_COLUMN || aggregationType == HYDROCARBON_COLUMN;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigContourMapCalculator::isMeanResult( ResultAggregationEnum aggregationType )
|
||||
bool RigContourMapCalculator::isMeanResult( ResultAggregationType aggregationType )
|
||||
{
|
||||
return aggregationType == RESULTS_MEAN_VALUE || aggregationType == RESULTS_HARM_VALUE || aggregationType == RESULTS_GEOM_VALUE;
|
||||
return aggregationType == MEAN || aggregationType == HARMONIC_MEAN || aggregationType == GEOMETRIC_MEAN;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigContourMapCalculator::isStraightSummationResult( ResultAggregationEnum aggregationType )
|
||||
bool RigContourMapCalculator::isStraightSummationResult( ResultAggregationType aggregationType )
|
||||
{
|
||||
return aggregationType == RESULTS_OIL_COLUMN || aggregationType == RESULTS_GAS_COLUMN || aggregationType == RESULTS_HC_COLUMN ||
|
||||
aggregationType == RESULTS_SUM;
|
||||
return aggregationType == OIL_COLUMN || aggregationType == GAS_COLUMN || aggregationType == HYDROCARBON_COLUMN || aggregationType == SUM;
|
||||
}
|
||||
|
@@ -35,30 +35,30 @@ class RigContourMapCalculator
|
||||
public:
|
||||
using CellIndexAndResult = std::pair<size_t, double>;
|
||||
|
||||
enum ResultAggregationEnum
|
||||
enum ResultAggregationType
|
||||
{
|
||||
RESULTS_TOP_VALUE,
|
||||
RESULTS_MEAN_VALUE,
|
||||
RESULTS_GEOM_VALUE,
|
||||
RESULTS_HARM_VALUE,
|
||||
RESULTS_MIN_VALUE,
|
||||
RESULTS_MAX_VALUE,
|
||||
RESULTS_VOLUME_SUM,
|
||||
RESULTS_SUM,
|
||||
RESULTS_OIL_COLUMN,
|
||||
RESULTS_GAS_COLUMN,
|
||||
RESULTS_HC_COLUMN
|
||||
TOP_VALUE,
|
||||
MEAN,
|
||||
GEOMETRIC_MEAN,
|
||||
HARMONIC_MEAN,
|
||||
MIN_VALUE,
|
||||
MAX_VALUE,
|
||||
VOLUME_SUM,
|
||||
SUM,
|
||||
OIL_COLUMN,
|
||||
GAS_COLUMN,
|
||||
HYDROCARBON_COLUMN
|
||||
};
|
||||
|
||||
static std::vector<std::vector<std::pair<size_t, double>>> generateGridMapping( RigContourMapProjection& contourMapProjection,
|
||||
const RigContourMapGrid& contourMapGrid,
|
||||
ResultAggregationEnum resultAggregation,
|
||||
ResultAggregationType resultAggregation,
|
||||
const std::vector<double>& weightingResultValues );
|
||||
|
||||
static double calculateValueInMapCell( const RigContourMapProjection& contourMapProjection,
|
||||
const std::vector<std::pair<size_t, double>>& matchingCells,
|
||||
const std::vector<double>& gridCellValues,
|
||||
ResultAggregationEnum resultAggregation );
|
||||
ResultAggregationType resultAggregation );
|
||||
|
||||
static std::vector<CellIndexAndResult> cellOverlapVolumesAndResults( const RigContourMapProjection& contourMapProjection,
|
||||
const RigContourMapGrid& contourMapGrid,
|
||||
@@ -70,9 +70,9 @@ public:
|
||||
const cvf::Vec2d& globalPos2d,
|
||||
const std::vector<double>& weightingResultValues );
|
||||
|
||||
static bool isColumnResult( ResultAggregationEnum aggregationType );
|
||||
static bool isMeanResult( ResultAggregationEnum aggregationType );
|
||||
static bool isStraightSummationResult( ResultAggregationEnum aggregationType );
|
||||
static bool isColumnResult( ResultAggregationType aggregationType );
|
||||
static bool isMeanResult( ResultAggregationType aggregationType );
|
||||
static bool isStraightSummationResult( ResultAggregationType aggregationType );
|
||||
|
||||
private:
|
||||
static double calculateTopValue( const RigContourMapProjection& contourMapProjection,
|
||||
|
@@ -44,7 +44,7 @@ RigContourMapProjection::RigContourMapProjection( const RigContourMapGrid& conto
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::vector<std::pair<size_t, double>>>
|
||||
RigContourMapProjection::generateGridMapping( RigContourMapCalculator::ResultAggregationEnum resultAggregation,
|
||||
RigContourMapProjection::generateGridMapping( RigContourMapCalculator::ResultAggregationType resultAggregation,
|
||||
const std::vector<double>& weights )
|
||||
{
|
||||
m_projected3dGridIndices = RigContourMapCalculator::generateGridMapping( *this, m_contourMapGrid, resultAggregation, weights );
|
||||
@@ -201,7 +201,7 @@ size_t RigContourMapProjection::gridResultIndex( size_t globalCellIdx ) const
|
||||
double RigContourMapProjection::calculateValueInMapCell( unsigned int i,
|
||||
unsigned int j,
|
||||
const std::vector<double>& gridCellValues,
|
||||
RigContourMapCalculator::ResultAggregationEnum resultAggregation ) const
|
||||
RigContourMapCalculator::ResultAggregationType resultAggregation ) const
|
||||
{
|
||||
const std::vector<std::pair<size_t, double>>& matchingCells = cellsAtIJ( i, j );
|
||||
return RigContourMapCalculator::calculateValueInMapCell( *this, matchingCells, gridCellValues, resultAggregation );
|
||||
|
@@ -75,13 +75,13 @@ public:
|
||||
virtual double calculateOverlapVolume( size_t globalCellIdx, const cvf::BoundingBox& bbox ) const = 0;
|
||||
virtual double calculateRayLengthInCell( size_t globalCellIdx, const cvf::Vec3d& highestPoint, const cvf::Vec3d& lowestPoint ) const = 0;
|
||||
virtual double getParameterWeightForCell( size_t globalCellIdx, const std::vector<double>& parameterWeights ) const = 0;
|
||||
virtual std::vector<bool> getMapCellVisibility( int viewStepIndex, RigContourMapCalculator::ResultAggregationEnum resultAggregation ) = 0;
|
||||
virtual std::vector<bool> getMapCellVisibility( int viewStepIndex, RigContourMapCalculator::ResultAggregationType resultAggregation ) = 0;
|
||||
|
||||
void setCellVisibility( cvf::ref<cvf::UByteArray> cellVisibility );
|
||||
cvf::ref<cvf::UByteArray> getCellVisibility() const;
|
||||
|
||||
std::vector<std::vector<std::pair<size_t, double>>>
|
||||
generateGridMapping( RigContourMapCalculator::ResultAggregationEnum resultAggregation, const std::vector<double>& weights );
|
||||
generateGridMapping( RigContourMapCalculator::ResultAggregationType resultAggregation, const std::vector<double>& weights );
|
||||
|
||||
double interpolateValue( const cvf::Vec2d& gridPosition2d ) const;
|
||||
|
||||
@@ -100,7 +100,7 @@ protected:
|
||||
double calculateValueInMapCell( unsigned int i,
|
||||
unsigned int j,
|
||||
const std::vector<double>& gridCellValues,
|
||||
RigContourMapCalculator::ResultAggregationEnum resultAggregation ) const;
|
||||
RigContourMapCalculator::ResultAggregationType resultAggregation ) const;
|
||||
|
||||
double valueInCell( unsigned int i, unsigned int j ) const;
|
||||
bool hasResultInCell( unsigned int i, unsigned int j ) const;
|
||||
|
@@ -59,7 +59,7 @@ RigEclipseContourMapProjection::~RigEclipseContourMapProjection()
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigEclipseContourMapProjection::generateAndSaveResults( const RigEclipseResultAddress& resultAddress,
|
||||
RigContourMapCalculator::ResultAggregationEnum resultAggregation,
|
||||
RigContourMapCalculator::ResultAggregationType resultAggregation,
|
||||
int timeStep )
|
||||
{
|
||||
std::tie( m_useActiveCellInfo, m_aggregatedResults ) =
|
||||
@@ -70,7 +70,7 @@ void RigEclipseContourMapProjection::generateAndSaveResults( const RigEclipseRes
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<double> RigEclipseContourMapProjection::generateResults( const RigEclipseResultAddress& resultAddress,
|
||||
RigContourMapCalculator::ResultAggregationEnum resultAggregation,
|
||||
RigContourMapCalculator::ResultAggregationType resultAggregation,
|
||||
int timeStep ) const
|
||||
{
|
||||
std::pair<bool, std::vector<double>> result =
|
||||
@@ -86,7 +86,7 @@ std::pair<bool, std::vector<double>>
|
||||
const RigContourMapGrid& contourMapGrid,
|
||||
RigCaseCellResultsData& resultData,
|
||||
const RigEclipseResultAddress& resultAddress,
|
||||
RigContourMapCalculator::ResultAggregationEnum resultAggregation,
|
||||
RigContourMapCalculator::ResultAggregationType resultAggregation,
|
||||
int timeStep )
|
||||
{
|
||||
size_t nCells = contourMapProjection.numberOfCells();
|
||||
@@ -110,14 +110,12 @@ std::pair<bool, std::vector<double>>
|
||||
resultData.ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PORO" ) );
|
||||
resultData.ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "NTG" ) );
|
||||
resultData.ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "DZ" ) );
|
||||
if ( resultAggregation == RigContourMapCalculator::RESULTS_OIL_COLUMN ||
|
||||
resultAggregation == RigContourMapCalculator::RESULTS_HC_COLUMN )
|
||||
if ( resultAggregation == RigContourMapCalculator::OIL_COLUMN || resultAggregation == RigContourMapCalculator::HYDROCARBON_COLUMN )
|
||||
{
|
||||
resultData.ensureKnownResultLoaded(
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::soil() ) );
|
||||
}
|
||||
if ( resultAggregation == RigContourMapCalculator::RESULTS_GAS_COLUMN ||
|
||||
resultAggregation == RigContourMapCalculator::RESULTS_HC_COLUMN )
|
||||
if ( resultAggregation == RigContourMapCalculator::GAS_COLUMN || resultAggregation == RigContourMapCalculator::HYDROCARBON_COLUMN )
|
||||
{
|
||||
resultData.ensureKnownResultLoaded(
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() ) );
|
||||
@@ -154,7 +152,7 @@ std::pair<bool, std::vector<double>>
|
||||
return { useActiveCellInfo, aggregatedResults };
|
||||
}
|
||||
|
||||
std::vector<double> RigEclipseContourMapProjection::calculateColumnResult( RigContourMapCalculator::ResultAggregationEnum resultAggregation,
|
||||
std::vector<double> RigEclipseContourMapProjection::calculateColumnResult( RigContourMapCalculator::ResultAggregationType resultAggregation,
|
||||
int timeStep ) const
|
||||
{
|
||||
return calculateColumnResult( m_resultData, resultAggregation, timeStep );
|
||||
@@ -164,7 +162,7 @@ std::vector<double> RigEclipseContourMapProjection::calculateColumnResult( RigCo
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<double> RigEclipseContourMapProjection::calculateColumnResult( RigCaseCellResultsData& resultData,
|
||||
RigContourMapCalculator::ResultAggregationEnum resultAggregation,
|
||||
RigContourMapCalculator::ResultAggregationType resultAggregation,
|
||||
int timeStep )
|
||||
{
|
||||
bool hasPoroResult = resultData.hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PORO" ) );
|
||||
@@ -187,7 +185,7 @@ std::vector<double> RigEclipseContourMapProjection::calculateColumnResult( RigCa
|
||||
|
||||
std::vector<double> resultValues( poroResults.size(), 0.0 );
|
||||
|
||||
if ( resultAggregation == RigContourMapCalculator::RESULTS_OIL_COLUMN || resultAggregation == RigContourMapCalculator::RESULTS_HC_COLUMN )
|
||||
if ( resultAggregation == RigContourMapCalculator::OIL_COLUMN || resultAggregation == RigContourMapCalculator::HYDROCARBON_COLUMN )
|
||||
{
|
||||
const std::vector<double>& soilResults =
|
||||
resultData.cellScalarResults( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::soil() ),
|
||||
@@ -198,7 +196,7 @@ std::vector<double> RigEclipseContourMapProjection::calculateColumnResult( RigCa
|
||||
}
|
||||
}
|
||||
|
||||
if ( resultAggregation == RigContourMapCalculator::RESULTS_GAS_COLUMN || resultAggregation == RigContourMapCalculator::RESULTS_HC_COLUMN )
|
||||
if ( resultAggregation == RigContourMapCalculator::GAS_COLUMN || resultAggregation == RigContourMapCalculator::HYDROCARBON_COLUMN )
|
||||
{
|
||||
bool hasGasResult =
|
||||
resultData.hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() ) );
|
||||
@@ -328,7 +326,7 @@ size_t RigEclipseContourMapProjection::gridResultIndex( size_t globalCellIdx ) c
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<bool> RigEclipseContourMapProjection::getMapCellVisibility( int viewStepIndex,
|
||||
RigContourMapCalculator::ResultAggregationEnum resultAggregation )
|
||||
RigContourMapCalculator::ResultAggregationType resultAggregation )
|
||||
|
||||
{
|
||||
return std::vector<bool>( numberOfCells(), true );
|
||||
|
@@ -44,21 +44,21 @@ public:
|
||||
virtual ~RigEclipseContourMapProjection();
|
||||
|
||||
void generateAndSaveResults( const RigEclipseResultAddress& resultAddress,
|
||||
RigContourMapCalculator::ResultAggregationEnum resultAggregation,
|
||||
RigContourMapCalculator::ResultAggregationType resultAggregation,
|
||||
int timeStep );
|
||||
|
||||
std::vector<double> generateResults( const RigEclipseResultAddress& resultAddress,
|
||||
RigContourMapCalculator::ResultAggregationEnum resultAggregation,
|
||||
RigContourMapCalculator::ResultAggregationType resultAggregation,
|
||||
int timeStep ) const;
|
||||
|
||||
static std::pair<bool, std::vector<double>> generateResults( const RigEclipseContourMapProjection& contourMapProjection,
|
||||
const RigContourMapGrid& contourMapGrid,
|
||||
RigCaseCellResultsData& resultData,
|
||||
const RigEclipseResultAddress& resultAddress,
|
||||
RigContourMapCalculator::ResultAggregationEnum resultAggregation,
|
||||
RigContourMapCalculator::ResultAggregationType resultAggregation,
|
||||
int timeStep );
|
||||
|
||||
std::vector<bool> getMapCellVisibility( int viewStepIndex, RigContourMapCalculator::ResultAggregationEnum resultAggregation ) override;
|
||||
std::vector<bool> getMapCellVisibility( int viewStepIndex, RigContourMapCalculator::ResultAggregationType resultAggregation ) override;
|
||||
|
||||
protected:
|
||||
using CellIndexAndResult = RigContourMapProjection::CellIndexAndResult;
|
||||
@@ -72,10 +72,10 @@ protected:
|
||||
size_t gridResultIndex( size_t globalCellIdx ) const override;
|
||||
|
||||
// Eclipse implementation specific data generation methods
|
||||
std::vector<double> calculateColumnResult( RigContourMapCalculator::ResultAggregationEnum resultAggregation, int timeStep ) const;
|
||||
std::vector<double> calculateColumnResult( RigContourMapCalculator::ResultAggregationType resultAggregation, int timeStep ) const;
|
||||
|
||||
static std::vector<double> calculateColumnResult( RigCaseCellResultsData& resultData,
|
||||
RigContourMapCalculator::ResultAggregationEnum resultAggregation,
|
||||
RigContourMapCalculator::ResultAggregationType resultAggregation,
|
||||
int timeStep );
|
||||
|
||||
protected:
|
||||
|
@@ -112,7 +112,7 @@ cvf::BoundingBox RigGeoMechContourMapProjection::calculateExpandedPorBarBBox( Ri
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<bool> RigGeoMechContourMapProjection::getMapCellVisibility( int viewStepIndex,
|
||||
RigContourMapCalculator::ResultAggregationEnum resultAggregation )
|
||||
RigContourMapCalculator::ResultAggregationType resultAggregation )
|
||||
{
|
||||
return getMapCellVisibility( m_currentResultAddr, viewStepIndex, resultAggregation );
|
||||
}
|
||||
@@ -122,7 +122,7 @@ std::vector<bool> RigGeoMechContourMapProjection::getMapCellVisibility( int
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<bool> RigGeoMechContourMapProjection::getMapCellVisibility( RigFemResultAddress resAddr,
|
||||
int viewStepIndex,
|
||||
RigContourMapCalculator::ResultAggregationEnum resultAggregation )
|
||||
RigContourMapCalculator::ResultAggregationType resultAggregation )
|
||||
{
|
||||
cvf::Vec2ui nCellsIJ = numberOfElementsIJ();
|
||||
std::vector<std::vector<unsigned int>> distanceImage( nCellsIJ.x(), std::vector<unsigned int>( nCellsIJ.y(), 0u ) );
|
||||
@@ -183,7 +183,7 @@ std::vector<bool> RigGeoMechContourMapProjection::getMapCellVisibility( RigFemRe
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigGeoMechContourMapProjection::generateAndSaveResults( RigFemResultAddress resultAddress,
|
||||
RigContourMapCalculator::ResultAggregationEnum resultAggregation,
|
||||
RigContourMapCalculator::ResultAggregationType resultAggregation,
|
||||
int viewerStepIndex )
|
||||
{
|
||||
m_aggregatedResults = generateResultsFromAddress( resultAddress, m_mapCellVisibility, resultAggregation, viewerStepIndex );
|
||||
@@ -194,7 +194,7 @@ void RigGeoMechContourMapProjection::generateAndSaveResults( RigFemResultAddress
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<double> RigGeoMechContourMapProjection::generateResultsFromAddress( RigFemResultAddress resultAddress,
|
||||
const std::vector<bool>& mapCellVisibility,
|
||||
RigContourMapCalculator::ResultAggregationEnum resultAggregation,
|
||||
RigContourMapCalculator::ResultAggregationType resultAggregation,
|
||||
int viewerStepIndex ) const
|
||||
{
|
||||
RigFemPartResultsCollection* resultCollection = m_caseData.femPartResults();
|
||||
|
@@ -40,12 +40,12 @@ public:
|
||||
double paddingAroundPorePressureRegion );
|
||||
|
||||
void generateAndSaveResults( RigFemResultAddress resultAddress,
|
||||
RigContourMapCalculator::ResultAggregationEnum resultAggregation,
|
||||
RigContourMapCalculator::ResultAggregationType resultAggregation,
|
||||
int viewerStepIndex );
|
||||
|
||||
std::vector<double> generateResultsFromAddress( RigFemResultAddress resultAddress,
|
||||
const std::vector<bool>& mapCellVisibility,
|
||||
RigContourMapCalculator::ResultAggregationEnum resultAggregation,
|
||||
RigContourMapCalculator::ResultAggregationType resultAggregation,
|
||||
int viewerStepIndex ) const;
|
||||
|
||||
static cvf::BoundingBox calculateExpandedPorBarBBox( RigGeoMechCaseData& caseData,
|
||||
@@ -54,11 +54,11 @@ public:
|
||||
int frameIndex,
|
||||
double padding );
|
||||
|
||||
std::vector<bool> getMapCellVisibility( int viewStepIndex, RigContourMapCalculator::ResultAggregationEnum resultAggregation ) override;
|
||||
std::vector<bool> getMapCellVisibility( int viewStepIndex, RigContourMapCalculator::ResultAggregationType resultAggregation ) override;
|
||||
|
||||
std::vector<bool> getMapCellVisibility( RigFemResultAddress resAddr,
|
||||
int viewStepIndex,
|
||||
RigContourMapCalculator::ResultAggregationEnum resultAggregation );
|
||||
RigContourMapCalculator::ResultAggregationType resultAggregation );
|
||||
|
||||
protected:
|
||||
// GeoMech implementation specific data generation methods
|
||||
|
Reference in New Issue
Block a user