mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
@@ -37,33 +37,6 @@ RigFemNativeVisibleCellsStatCalc::RigFemNativeVisibleCellsStatCalc(RigGeoMechCas
|
||||
m_resultsData = femCase->femPartResults();
|
||||
}
|
||||
|
||||
class MinMaxAccumulator
|
||||
{
|
||||
public:
|
||||
MinMaxAccumulator(double initMin, double initMax): max(initMax), min(initMin) {}
|
||||
void addValue(double value)
|
||||
{
|
||||
if (value == HUGE_VAL) // TODO
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (value < min)
|
||||
{
|
||||
min = value;
|
||||
}
|
||||
|
||||
if (value > max)
|
||||
{
|
||||
max = value;
|
||||
}
|
||||
}
|
||||
|
||||
double max;
|
||||
double min;
|
||||
};
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -77,32 +50,6 @@ void RigFemNativeVisibleCellsStatCalc::minMaxCellScalarValues(size_t timeStepInd
|
||||
}
|
||||
|
||||
|
||||
class PosNegAccumulator
|
||||
{
|
||||
public:
|
||||
PosNegAccumulator(double initPos, double initNeg): pos(initPos), neg(initNeg) {}
|
||||
void addValue(double value)
|
||||
{
|
||||
if (value == HUGE_VAL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (value < pos && value > 0)
|
||||
{
|
||||
pos = value;
|
||||
}
|
||||
|
||||
if (value > neg && value < 0)
|
||||
{
|
||||
neg = value;
|
||||
}
|
||||
}
|
||||
|
||||
double pos;
|
||||
double neg;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -115,26 +62,6 @@ void RigFemNativeVisibleCellsStatCalc::posNegClosestToZero(size_t timeStepIndex,
|
||||
|
||||
}
|
||||
|
||||
class SumCountAccumulator
|
||||
{
|
||||
public:
|
||||
SumCountAccumulator(double initSum, size_t initCount): valueSum(initSum), sampleCount(initCount) {}
|
||||
|
||||
void addValue(double value)
|
||||
{
|
||||
if (value == HUGE_VAL || value != value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
valueSum += value;
|
||||
++sampleCount;
|
||||
}
|
||||
|
||||
double valueSum;
|
||||
size_t sampleCount;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user