(#606) (#607) Added eclipse stats for visible cells

This commit is contained in:
Jacob Støren
2015-11-06 13:22:54 +01:00
parent 67abe959db
commit 4f05c0d6b9
9 changed files with 354 additions and 145 deletions

View File

@@ -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;
};
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------