WellGroupHelpers: drop indent for namespace

This commit is contained in:
Arne Morten Kvarving 2024-04-19 10:59:53 +02:00
parent cff4e4b514
commit d6fc7cc4f6
2 changed files with 1656 additions and 1666 deletions

File diff suppressed because it is too large Load Diff

View File

@ -29,8 +29,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
namespace Opm namespace Opm {
{
class DeferredLogger; class DeferredLogger;
class Group; class Group;
@ -44,262 +43,259 @@ class FieldPropsManager;
namespace Network { class ExtNetwork; } namespace Network { class ExtNetwork; }
namespace WellGroupHelpers namespace WellGroupHelpers {
{
void setCmodeGroup(const Group& group,
const Schedule& schedule,
const SummaryState& summaryState,
const int reportStepIdx,
GroupState<double>& group_state);
void accumulateGroupEfficiencyFactor(const Group& group,
const Schedule& schedule,
const int reportStepIdx,
double& factor);
void setCmodeGroup(const Group& group, double sumWellSurfaceRates(const Group& group,
const Schedule& schedule,
const SummaryState& summaryState,
const int reportStepIdx,
GroupState<double>& group_state);
void accumulateGroupEfficiencyFactor(const Group& group,
const Schedule& schedule,
const int reportStepIdx,
double& factor);
double sumWellSurfaceRates(const Group& group,
const Schedule& schedule,
const WellState<double>& wellState,
const int reportStepIdx,
const int phasePos,
const bool injector);
double sumWellResRates(const Group& group,
const Schedule& schedule, const Schedule& schedule,
const WellState<double>& wellState, const WellState<double>& wellState,
const int reportStepIdx, const int reportStepIdx,
const int phasePos, const int phasePos,
const bool injector); const bool injector);
double sumSolventRates(const Group& group, double sumWellResRates(const Group& group,
const Schedule& schedule, const Schedule& schedule,
const WellState<double>& wellState, const WellState<double>& wellState,
const int reportStepIdx, const int reportStepIdx,
const bool injector); const int phasePos,
const bool injector);
void updateGroupTargetReduction(const Group& group, double sumSolventRates(const Group& group,
const Schedule& schedule, const Schedule& schedule,
const int reportStepIdx, const WellState<double>& wellState,
const bool isInjector, const int reportStepIdx,
const PhaseUsage& pu, const bool injector);
const GuideRate& guide_rate,
const WellState<double>& wellState,
GroupState<double>& group_state,
std::vector<double>& groupTargetReduction);
void updateGuideRates(const Group& group, void updateGroupTargetReduction(const Group& group,
const Schedule& schedule, const Schedule& schedule,
const SummaryState& summary_state, const int reportStepIdx,
const PhaseUsage& pu, const bool isInjector,
int report_step, const PhaseUsage& pu,
double sim_time, const GuideRate& guide_rate,
WellState<double>& well_state, const WellState<double>& wellState,
const GroupState<double>& group_state, GroupState<double>& group_state,
const Parallel::Communication& comm, std::vector<double>& groupTargetReduction);
GuideRate* guide_rate,
std::vector<double>& pot,
Opm::DeferredLogger& deferred_logge);
void updateGuideRateForProductionGroups(const Group& group, void updateGuideRates(const Group& group,
const Schedule& schedule, const Schedule& schedule,
const PhaseUsage& pu, const SummaryState& summary_state,
const int reportStepIdx, const PhaseUsage& pu,
const double& simTime, int report_step,
WellState<double>& wellState, double sim_time,
const GroupState<double>& group_state, WellState<double>& well_state,
const Parallel::Communication& comm, const GroupState<double>& group_state,
GuideRate* guideRate, const Parallel::Communication& comm,
std::vector<double>& pot); GuideRate* guide_rate,
std::vector<double>& pot,
Opm::DeferredLogger& deferred_logge);
void updateGuideRatesForWells(const Schedule& schedule, void updateGuideRateForProductionGroups(const Group& group,
const PhaseUsage& pu, const Schedule& schedule,
const int reportStepIdx, const PhaseUsage& pu,
const double& simTime, const int reportStepIdx,
const WellState<double>& wellState, const double& simTime,
const Parallel::Communication& comm, WellState<double>& wellState,
GuideRate* guideRate); const GroupState<double>& group_state,
const Parallel::Communication& comm,
GuideRate* guideRate,
std::vector<double>& pot);
void updateGuideRatesForInjectionGroups(const Group& group, void updateGuideRatesForWells(const Schedule& schedule,
const Schedule& schedule, const PhaseUsage& pu,
const SummaryState& summaryState, const int reportStepIdx,
const Opm::PhaseUsage& pu, const double& simTime,
const int reportStepIdx, const WellState<double>& wellState,
const WellState<double>& wellState, const Parallel::Communication& comm,
const GroupState<double>& group_state, GuideRate* guideRate);
GuideRate* guideRate,
Opm::DeferredLogger& deferred_logger);
void updateVREPForGroups(const Group& group, void updateGuideRatesForInjectionGroups(const Group& group,
const Schedule& schedule, const Schedule& schedule,
const int reportStepIdx, const SummaryState& summaryState,
const WellState<double>& wellState, const Opm::PhaseUsage& pu,
GroupState<double>& group_state); const int reportStepIdx,
const WellState<double>& wellState,
const GroupState<double>& group_state,
GuideRate* guideRate,
Opm::DeferredLogger& deferred_logger);
void updateReservoirRatesInjectionGroups(const Group& group, void updateVREPForGroups(const Group& group,
const Schedule& schedule,
const int reportStepIdx,
const WellState<double>& wellState,
GroupState<double>& group_state);
void updateSurfaceRatesInjectionGroups(const Group& group,
const Schedule& schedule,
const int reportStepIdx,
const WellState<double>& wellState,
GroupState<double>& group_state);
void updateWellRates(const Group& group,
const Schedule& schedule, const Schedule& schedule,
const int reportStepIdx, const int reportStepIdx,
const WellState<double>& wellStateNupcol, const WellState<double>& wellState,
WellState<double>& wellState); GroupState<double>& group_state);
void updateGroupProductionRates(const Group& group, void updateReservoirRatesInjectionGroups(const Group& group,
const Schedule& schedule, const Schedule& schedule,
const int reportStepIdx, const int reportStepIdx,
const WellState<double>& wellState, const WellState<double>& wellState,
GroupState<double>& group_state); GroupState<double>& group_state);
void updateWellRatesFromGroupTargetScale(const double scale, void updateSurfaceRatesInjectionGroups(const Group& group,
const Group& group, const Schedule& schedule,
const Schedule& schedule, const int reportStepIdx,
const int reportStepIdx, const WellState<double>& wellState,
bool isInjector, GroupState<double>& group_state);
const GroupState<double>& group_state,
WellState<double>& wellState);
void updateREINForGroups(const Group& group, void updateWellRates(const Group& group,
const Schedule& schedule, const Schedule& schedule,
const int reportStepIdx, const int reportStepIdx,
const PhaseUsage& pu, const WellState<double>& wellStateNupcol,
const SummaryState& st, WellState<double>& wellState);
const WellState<double>& wellState,
GroupState<double>& group_state,
bool sum_rank);
void updateGroupProductionRates(const Group& group,
/// Returns the name of the worst offending well and its fraction const Schedule& schedule,
/// (i.e. violated_phase / preferred_phase) const int reportStepIdx,
std::pair<std::optional<std::string>, double> const WellState<double>& wellState,
worstOffendingWell(const Group& group, GroupState<double>& group_state);
const Schedule& schedule,
const int reportStepIdx,
const Group::ProductionCMode& offendedControl,
const PhaseUsage& pu,
const Parallel::Communication& comm,
const WellState<double>& wellState,
DeferredLogger& deferred_logger);
template <class RegionalValues> void updateWellRatesFromGroupTargetScale(const double scale,
void updateGpMaintTargetForGroups(const Group& group, const Group& group,
const Schedule& schedule, const Schedule& schedule,
const RegionalValues& regional_values, const int reportStepIdx,
const int reportStepIdx, bool isInjector,
const double dt, const GroupState<double>& group_state,
const WellState<double>& well_state, WellState<double>& wellState);
GroupState<double>& group_state);
std::map<std::string, double> void updateREINForGroups(const Group& group,
computeNetworkPressures(const Opm::Network::ExtNetwork& network, const Schedule& schedule,
const WellState<double>& well_state, const int reportStepIdx,
const GroupState<double>& group_state, const PhaseUsage& pu,
const VFPProdProperties& vfp_prod_props, const SummaryState& st,
const Schedule& schedule, const WellState<double>& wellState,
const int report_time_step); GroupState<double>& group_state,
bool sum_rank);
GuideRate::RateVector
getWellRateVector(const WellState<double>& well_state,
const PhaseUsage& pu,
const std::string& name);
GuideRate::RateVector /// Returns the name of the worst offending well and its fraction
getProductionGroupRateVector(const GroupState<double>& group_state, /// (i.e. violated_phase / preferred_phase)
const PhaseUsage& pu, std::pair<std::optional<std::string>, double>
const std::string& group_name); worstOffendingWell(const Group& group,
const Schedule& schedule,
const int reportStepIdx,
const Group::ProductionCMode& offendedControl,
const PhaseUsage& pu,
const Parallel::Communication& comm,
const WellState<double>& wellState,
DeferredLogger& deferred_logger);
double getGuideRate(const std::string& name, template <class RegionalValues>
const Schedule& schedule, void updateGpMaintTargetForGroups(const Group& group,
const WellState<double>& wellState, const Schedule& schedule,
const RegionalValues& regional_values,
const int reportStepIdx,
const double dt,
const WellState<double>& well_state,
GroupState<double>& group_state);
std::map<std::string, double>
computeNetworkPressures(const Opm::Network::ExtNetwork& network,
const WellState<double>& well_state,
const GroupState<double>& group_state, const GroupState<double>& group_state,
const int reportStepIdx, const VFPProdProperties& vfp_prod_props,
const GuideRate* guideRate, const Schedule& schedule,
const GuideRateModel::Target target, const int report_time_step);
const PhaseUsage& pu);
GuideRate::RateVector
getWellRateVector(const WellState<double>& well_state,
const PhaseUsage& pu,
const std::string& name);
GuideRate::RateVector
getProductionGroupRateVector(const GroupState<double>& group_state,
const PhaseUsage& pu,
const std::string& group_name);
double getGuideRate(const std::string& name,
const Schedule& schedule,
const WellState<double>& wellState,
const GroupState<double>& group_state,
const int reportStepIdx,
const GuideRate* guideRate,
const GuideRateModel::Target target,
const PhaseUsage& pu);
double getGuideRateInj(const std::string& name, double getGuideRateInj(const std::string& name,
const Schedule& schedule, const Schedule& schedule,
const WellState<double>& wellState, const WellState<double>& wellState,
const GroupState<double>& group_state, const GroupState<double>& group_state,
const int reportStepIdx, const int reportStepIdx,
const GuideRate* guideRate, const GuideRate* guideRate,
const GuideRateModel::Target target, const GuideRateModel::Target target,
const Phase& injectionPhase, const Phase& injectionPhase,
const PhaseUsage& pu); const PhaseUsage& pu);
int groupControlledWells(const Schedule& schedule, int groupControlledWells(const Schedule& schedule,
const WellState<double>& well_state, const WellState<double>& well_state,
const GroupState<double>& group_state, const GroupState<double>& group_state,
const int report_step, const int report_step,
const std::string& group_name, const std::string& group_name,
const std::string& always_included_child, const std::string& always_included_child,
const bool is_production_group, const bool is_production_group,
const Phase injection_phase); const Phase injection_phase);
std::pair<bool, double> checkGroupConstraintsInj(const std::string& name, std::pair<bool, double> checkGroupConstraintsInj(const std::string& name,
const std::string& parent, const std::string& parent,
const Group& group, const Group& group,
const WellState<double>& wellState, const WellState<double>& wellState,
const GroupState<double>& group_state, const GroupState<double>& group_state,
const int reportStepIdx, const int reportStepIdx,
const GuideRate* guideRate, const GuideRate* guideRate,
const double* rates, const double* rates,
Phase injectionPhase, Phase injectionPhase,
const PhaseUsage& pu, const PhaseUsage& pu,
const double efficiencyFactor, const double efficiencyFactor,
const Schedule& schedule, const Schedule& schedule,
const SummaryState& summaryState, const SummaryState& summaryState,
const std::vector<double>& resv_coeff, const std::vector<double>& resv_coeff,
DeferredLogger& deferred_logger); DeferredLogger& deferred_logger);
std::vector<std::string> groupChainTopBot(const std::string& bottom, std::vector<std::string> groupChainTopBot(const std::string& bottom,
const std::string& top, const std::string& top,
const Schedule& schedule, const Schedule& schedule,
const int report_step); const int report_step);
std::pair<bool, double> checkGroupConstraintsProd(const std::string& name, std::pair<bool, double> checkGroupConstraintsProd(const std::string& name,
const std::string& parent, const std::string& parent,
const Group& group, const Group& group,
const WellState<double>& wellState, const WellState<double>& wellState,
const GroupState<double>& group_state, const GroupState<double>& group_state,
const int reportStepIdx, const int reportStepIdx,
const GuideRate* guideRate, const GuideRate* guideRate,
const double* rates, const double* rates,
const PhaseUsage& pu, const PhaseUsage& pu,
const double efficiencyFactor, const double efficiencyFactor,
const Schedule& schedule, const Schedule& schedule,
const SummaryState& summaryState, const SummaryState& summaryState,
const std::vector<double>& resv_coeff, const std::vector<double>& resv_coeff,
DeferredLogger& deferred_logger); DeferredLogger& deferred_logger);
template <class AverageRegionalPressureType> template <class AverageRegionalPressureType>
void setRegionAveragePressureCalculator(const Group& group, void setRegionAveragePressureCalculator(const Group& group,
const Schedule& schedule, const Schedule& schedule,
const int reportStepIdx, const int reportStepIdx,
const FieldPropsManager& fp, const FieldPropsManager& fp,
const PhaseUsage& pu, const PhaseUsage& pu,
std::map<std::string, std::unique_ptr<AverageRegionalPressureType>>& regionalAveragePressureCalculator); std::map<std::string, std::unique_ptr<AverageRegionalPressureType>>& regionalAveragePressureCalculator);
} // namespace WellGroupHelpers } // namespace WellGroupHelpers