mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#8989 Grid statistics: Improve precision of p10/p90.
This commit is contained in:
@@ -46,6 +46,39 @@ void RigEclipseNativeStatCalc::minMaxCellScalarValues( size_t timeStepIndex, dou
|
||||
max = acc.max;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigEclipseNativeStatCalc::hasPreciseP10p90() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigEclipseNativeStatCalc::p10p90CellScalarValues( double& p10, double& p90 )
|
||||
{
|
||||
PercentilAccumulator acc;
|
||||
|
||||
for ( size_t timeStepIndex = 0; timeStepIndex < timeStepCount(); timeStepIndex++ )
|
||||
{
|
||||
traverseCells( acc, timeStepIndex );
|
||||
}
|
||||
|
||||
acc.computep10p90( p10, p90 );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigEclipseNativeStatCalc::p10p90CellScalarValues( size_t timeStepIndex, double& p10, double& p90 )
|
||||
{
|
||||
PercentilAccumulator acc;
|
||||
traverseCells( acc, timeStepIndex );
|
||||
acc.computep10p90( p10, p90 );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -35,6 +35,9 @@ class RigEclipseNativeStatCalc : public RigStatisticsCalculator
|
||||
public:
|
||||
RigEclipseNativeStatCalc( RigCaseCellResultsData* cellResultsData, const RigEclipseResultAddress& eclipseResultAddress );
|
||||
|
||||
bool hasPreciseP10p90() const override;
|
||||
void p10p90CellScalarValues( double& min, double& max ) override;
|
||||
void p10p90CellScalarValues( size_t timeStepIndex, double& min, double& max ) override;
|
||||
void minMaxCellScalarValues( size_t timeStepIndex, double& min, double& max ) override;
|
||||
void posNegClosestToZero( size_t timeStepIndex, double& pos, double& neg ) override;
|
||||
void valueSumAndSampleCount( size_t timeStepIndex, double& valueSum, size_t& sampleCount ) override;
|
||||
|
||||
@@ -49,6 +49,39 @@ void RigEclipseNativeVisibleCellsStatCalc::minMaxCellScalarValues( size_t timeSt
|
||||
max = acc.max;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigEclipseNativeVisibleCellsStatCalc::hasPreciseP10p90() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigEclipseNativeVisibleCellsStatCalc::p10p90CellScalarValues( double& p10, double& p90 )
|
||||
{
|
||||
PercentilAccumulator acc;
|
||||
|
||||
for ( size_t timeStepIndex = 0; timeStepIndex < timeStepCount(); timeStepIndex++ )
|
||||
{
|
||||
traverseCells( acc, timeStepIndex );
|
||||
}
|
||||
|
||||
acc.computep10p90( p10, p90 );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigEclipseNativeVisibleCellsStatCalc::p10p90CellScalarValues( size_t timeStepIndex, double& p10, double& p90 )
|
||||
{
|
||||
PercentilAccumulator acc;
|
||||
traverseCells( acc, timeStepIndex );
|
||||
acc.computep10p90( p10, p90 );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -36,6 +36,9 @@ public:
|
||||
const RigEclipseResultAddress& scalarResultIndex,
|
||||
const cvf::UByteArray* cellVisibilities );
|
||||
|
||||
bool hasPreciseP10p90() const override;
|
||||
void p10p90CellScalarValues( double& min, double& max ) override;
|
||||
void p10p90CellScalarValues( size_t timeStepIndex, double& min, double& max ) override;
|
||||
void minMaxCellScalarValues( size_t timeStepIndex, double& min, double& max ) override;
|
||||
void posNegClosestToZero( size_t timeStepIndex, double& pos, double& neg ) override;
|
||||
void valueSumAndSampleCount( size_t timeStepIndex, double& valueSum, size_t& sampleCount ) override;
|
||||
|
||||
Reference in New Issue
Block a user