mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-28 02:00:59 -06:00
TargetCalculator: drop indent for namespace
This commit is contained in:
parent
d6fc7cc4f6
commit
9a42b70f20
@ -28,88 +28,87 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace Opm
|
namespace Opm {
|
||||||
{
|
|
||||||
|
|
||||||
class DeferredLogger;
|
class DeferredLogger;
|
||||||
template<class Scalar> class GroupState;
|
template<class Scalar> class GroupState;
|
||||||
struct PhaseUsage;
|
struct PhaseUsage;
|
||||||
|
|
||||||
namespace WellGroupHelpers
|
namespace WellGroupHelpers {
|
||||||
|
|
||||||
|
/// Based on a group control mode, extract or calculate rates, and
|
||||||
|
/// provide other conveniences.
|
||||||
|
class TargetCalculator
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
TargetCalculator(const Group::ProductionCMode cmode,
|
||||||
|
const PhaseUsage& pu,
|
||||||
|
const std::vector<double>& resv_coeff,
|
||||||
|
const double group_grat_target_from_sales,
|
||||||
|
const std::string& group_name,
|
||||||
|
const GroupState<double>& group_state,
|
||||||
|
const bool use_gpmaint);
|
||||||
|
|
||||||
/// Based on a group control mode, extract or calculate rates, and
|
template <typename RateType>
|
||||||
/// provide other conveniences.
|
RateType calcModeRateFromRates(const std::vector<RateType>& rates) const
|
||||||
class TargetCalculator
|
|
||||||
{
|
{
|
||||||
public:
|
return calcModeRateFromRates(rates.data());
|
||||||
TargetCalculator(const Group::ProductionCMode cmode,
|
}
|
||||||
const PhaseUsage& pu,
|
|
||||||
const std::vector<double>& resv_coeff,
|
|
||||||
const double group_grat_target_from_sales,
|
|
||||||
const std::string& group_name,
|
|
||||||
const GroupState<double>& group_state,
|
|
||||||
const bool use_gpmaint);
|
|
||||||
|
|
||||||
template <typename RateType>
|
template <typename RateType>
|
||||||
RateType calcModeRateFromRates(const std::vector<RateType>& rates) const
|
RateType calcModeRateFromRates(const RateType* rates) const;
|
||||||
{
|
|
||||||
return calcModeRateFromRates(rates.data());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename RateType>
|
double groupTarget(const std::optional<Group::ProductionControls>& ctrl, Opm::DeferredLogger& deferred_logger) const;
|
||||||
RateType calcModeRateFromRates(const RateType* rates) const;
|
|
||||||
|
|
||||||
double groupTarget(const std::optional<Group::ProductionControls>& ctrl, Opm::DeferredLogger& deferred_logger) const;
|
GuideRateModel::Target guideTargetMode() const;
|
||||||
|
|
||||||
GuideRateModel::Target guideTargetMode() const;
|
private:
|
||||||
|
Group::ProductionCMode cmode_;
|
||||||
|
const PhaseUsage& pu_;
|
||||||
|
const std::vector<double>& resv_coeff_;
|
||||||
|
const double group_grat_target_from_sales_;
|
||||||
|
const std::string& group_name_;
|
||||||
|
const GroupState<double>& group_state_;
|
||||||
|
bool use_gpmaint_;
|
||||||
|
};
|
||||||
|
|
||||||
private:
|
/// Based on a group control mode, extract or calculate rates, and
|
||||||
Group::ProductionCMode cmode_;
|
/// provide other conveniences.
|
||||||
const PhaseUsage& pu_;
|
class InjectionTargetCalculator
|
||||||
const std::vector<double>& resv_coeff_;
|
{
|
||||||
const double group_grat_target_from_sales_;
|
public:
|
||||||
const std::string& group_name_;
|
InjectionTargetCalculator(const Group::InjectionCMode& cmode,
|
||||||
const GroupState<double>& group_state_;
|
const PhaseUsage& pu,
|
||||||
bool use_gpmaint_;
|
const std::vector<double>& resv_coeff,
|
||||||
};
|
const std::string& group_name,
|
||||||
|
const double sales_target,
|
||||||
|
const GroupState<double>& group_state,
|
||||||
|
const Phase& injection_phase,
|
||||||
|
const bool use_gpmaint,
|
||||||
|
DeferredLogger& deferred_logger);
|
||||||
|
|
||||||
/// Based on a group control mode, extract or calculate rates, and
|
template <typename RateVec>
|
||||||
/// provide other conveniences.
|
auto calcModeRateFromRates(const RateVec& rates) const
|
||||||
class InjectionTargetCalculator
|
|
||||||
{
|
{
|
||||||
public:
|
return rates[pos_];
|
||||||
InjectionTargetCalculator(const Group::InjectionCMode& cmode,
|
}
|
||||||
const PhaseUsage& pu,
|
|
||||||
const std::vector<double>& resv_coeff,
|
|
||||||
const std::string& group_name,
|
|
||||||
const double sales_target,
|
|
||||||
const GroupState<double>& group_state,
|
|
||||||
const Phase& injection_phase,
|
|
||||||
const bool use_gpmaint,
|
|
||||||
DeferredLogger& deferred_logger);
|
|
||||||
|
|
||||||
template <typename RateVec>
|
double groupTarget(const std::optional<Group::InjectionControls>& ctrl, Opm::DeferredLogger& deferred_logger) const;
|
||||||
auto calcModeRateFromRates(const RateVec& rates) const
|
|
||||||
{
|
|
||||||
return rates[pos_];
|
|
||||||
}
|
|
||||||
|
|
||||||
double groupTarget(const std::optional<Group::InjectionControls>& ctrl, Opm::DeferredLogger& deferred_logger) const;
|
GuideRateModel::Target guideTargetMode() const;
|
||||||
|
|
||||||
GuideRateModel::Target guideTargetMode() const;
|
private:
|
||||||
|
Group::InjectionCMode cmode_;
|
||||||
|
const PhaseUsage& pu_;
|
||||||
|
const std::vector<double>& resv_coeff_;
|
||||||
|
const std::string& group_name_;
|
||||||
|
double sales_target_;
|
||||||
|
const GroupState<double>& group_state_;
|
||||||
|
bool use_gpmaint_;
|
||||||
|
int pos_;
|
||||||
|
GuideRateModel::Target target_;
|
||||||
|
};
|
||||||
|
|
||||||
private:
|
|
||||||
Group::InjectionCMode cmode_;
|
|
||||||
const PhaseUsage& pu_;
|
|
||||||
const std::vector<double>& resv_coeff_;
|
|
||||||
const std::string& group_name_;
|
|
||||||
double sales_target_;
|
|
||||||
const GroupState<double>& group_state_;
|
|
||||||
bool use_gpmaint_;
|
|
||||||
int pos_;
|
|
||||||
GuideRateModel::Target target_;
|
|
||||||
};
|
|
||||||
} // namespace WellGroupHelpers
|
} // namespace WellGroupHelpers
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
Loading…
Reference in New Issue
Block a user