///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2023- Equinor ASA // // ResInsight is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. // // See the GNU General Public License at // for more details. // ///////////////////////////////////////////////////////////////////////////////// #pragma once #include #include #include #include class RigAccWellFlowCalculator; class RigWellAllocationOverTime { public: RigWellAllocationOverTime( const std::vector& timeStepDates, const std::map& timeStepAndCalculatorPairs ); const std::vector timeStepDates() const { return m_timeStepDates; } const std::map> wellValuesMap() const { return m_wellValuesMap; } void fillWithFlowRateFractionValues(); void fillWithFlowRatePercentageValues(); void fillWithFlowRateValues(); void fillWithFlowVolumeValues(); void fillWithAccumulatedFlowVolumeValues( double smallContributionsThreshold ); void fillWithAccumulatedFlowVolumeFractionValues( double smallContributionsThreshold ); void fillWithAccumulatedFlowVolumePercentageValues( double smallContributionsThreshold ); private: enum class FractionOrPercentage { FRACTION, PERCENTAGE }; void fillWithAccumulatedFlowVolumeFractionOrPercentageValues( FractionOrPercentage selection, double smallContributionsThreshold ); void groupAccumulatedFlowVolumes( std::map>& rWellValuesMap, double threshold ); void groupAccumulatedFlowVolumeFractionsOrPercentages( std::map>& rWellValuesMap, double threshold ); private: std::map m_timeStepAndCalculatorPairs; std::vector m_timeStepDates; std::map> m_defaultWellValuesMap; std::map> m_wellValuesMap; };