//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
void RigFemNativeStatCalc::addDataToHistogramCalculator(size_t timeStepIndex, RigHistogramCalculator& histogramCalculator)
{
    int partCount = m_resultsData->partCount();
    for (int pIdx = 0; pIdx < partCount; ++pIdx)
    {
        const std::vector<float>& values = m_resultsData->resultValues(m_resVarAddr, pIdx, static_cast<int>(timeStepIndex));

        histogramCalculator.addData(values);
    }
}
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
void RigFemNativeStatCalc::addDataToHistogramCalculator(RigHistogramCalculator& histogramCalculator)
{
    int timestepCount = (int)(this->timeStepCount());
    int partCount = static_cast<int>(m_resultsData->m_femPartResults.size());
    for (int pIdx = 0; pIdx < partCount; ++pIdx)
    {
        for (int tIdx = 0; tIdx < timestepCount; tIdx++)
        {
            const std::vector<float>& values = m_resultsData->resultValues(m_resVarAddr, pIdx, tIdx);

            histogramCalculator.addData(values);
        }
    }
}
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
void RigEclipseNativeStatCalc::addDataToHistogramCalculator(size_t timeStepIndex, RigHistogramCalculator& histogramCalculator)
{
    std::vector<double>& values = m_resultsData->cellScalarResults(m_scalarResultIndex, timeStepIndex);

    histogramCalculator.addData(values);
}