mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Refactored some in 3D info regarding geomech cases.
This commit is contained in:
@@ -31,6 +31,8 @@
|
||||
RigStatisticsDataCache::RigStatisticsDataCache(RigStatisticsCalculator* statisticsCalculator)
|
||||
: m_statisticsCalculator(statisticsCalculator)
|
||||
{
|
||||
CVF_ASSERT(m_statisticsCalculator.notNull());
|
||||
|
||||
clearAllStatistics();
|
||||
}
|
||||
|
||||
@@ -153,6 +155,40 @@ void RigStatisticsDataCache::posNegClosestToZero(size_t timeStepIndex, double& p
|
||||
posNearZero = m_statsPrTs[timeStepIndex].m_posClosestToZero;
|
||||
negNearZero = m_statsPrTs[timeStepIndex].m_negClosestToZero;
|
||||
}
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigStatisticsDataCache::meanCellScalarValues(double& meanValue)
|
||||
{
|
||||
if (!m_statsAllTimesteps.m_isMeanCalculated)
|
||||
{
|
||||
m_statisticsCalculator->meanCellScalarValue(m_statsAllTimesteps.m_meanValue);
|
||||
|
||||
m_statsAllTimesteps.m_isMeanCalculated = true;
|
||||
}
|
||||
|
||||
meanValue = m_statsAllTimesteps.m_meanValue;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigStatisticsDataCache::meanCellScalarValues(size_t timeStepIndex, double& meanValue)
|
||||
{
|
||||
if (timeStepIndex >= m_statsPrTs.size())
|
||||
{
|
||||
m_statsPrTs.resize(timeStepIndex + 1);
|
||||
}
|
||||
|
||||
if (!m_statsPrTs[timeStepIndex].m_isMeanCalculated)
|
||||
{
|
||||
m_statisticsCalculator->meanCellScalarValue(timeStepIndex, m_statsPrTs[timeStepIndex].m_meanValue);
|
||||
m_statsPrTs[timeStepIndex].m_isMeanCalculated = true;
|
||||
}
|
||||
|
||||
meanValue = m_statsPrTs[timeStepIndex].m_meanValue;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -196,34 +232,6 @@ void RigStatisticsDataCache::p10p90CellScalarValues(size_t timeStepIndex, double
|
||||
p90 = m_statsPrTs[timeStepIndex].m_p90;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigStatisticsDataCache::meanCellScalarValues(double& meanValue)
|
||||
{
|
||||
if (!m_statsAllTimesteps.m_isMeanCalculated)
|
||||
{
|
||||
m_statisticsCalculator->meanCellScalarValue(m_statsAllTimesteps.m_meanValue);
|
||||
m_statsAllTimesteps.m_isMeanCalculated = true;
|
||||
}
|
||||
|
||||
meanValue = m_statsAllTimesteps.m_meanValue;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigStatisticsDataCache::meanCellScalarValues(size_t timeStepIndex, double& meanValue)
|
||||
{
|
||||
if (!m_statsPrTs[timeStepIndex].m_isMeanCalculated)
|
||||
{
|
||||
m_statisticsCalculator->meanCellScalarValue(timeStepIndex, m_statsPrTs[timeStepIndex].m_meanValue);
|
||||
m_statsPrTs[timeStepIndex].m_isMeanCalculated = true;
|
||||
}
|
||||
|
||||
meanValue = m_statsPrTs[timeStepIndex].m_meanValue;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user