GroupEconomicLimitsChecker: drop indent for namespace

This commit is contained in:
Arne Morten Kvarving
2024-02-19 09:49:02 +01:00
parent 137741e572
commit 88bc65c201
2 changed files with 75 additions and 69 deletions

View File

@@ -40,7 +40,8 @@
namespace Opm {
std::string simTimeToString(const std::time_t start_time, const double sim_time) {
std::string simTimeToString(const std::time_t start_time, const double sim_time)
{
const auto start_timep = std::chrono::system_clock::from_time_t(start_time);
const auto sim_duration = std::chrono::duration_cast<std::chrono::system_clock::duration>(
std::chrono::duration<double>(sim_time)
@@ -52,15 +53,13 @@ std::string simTimeToString(const std::time_t start_time, const double sim_time)
}
GroupEconomicLimitsChecker::
GroupEconomicLimitsChecker(
const BlackoilWellModelGeneric &well_model,
WellTestState &well_test_state,
const Group &group,
GroupEconomicLimitsChecker(const BlackoilWellModelGeneric& well_model,
WellTestState& well_test_state,
const Group& group,
const double simulation_time,
const int report_step_idx,
DeferredLogger &deferred_logger
) :
well_model_{well_model}
DeferredLogger& deferred_logger)
: well_model_{well_model}
, group_{group}
, simulation_time_{simulation_time}
, report_step_idx_{report_step_idx}
@@ -397,4 +396,5 @@ throwNotImplementedError(const std::string &error) const
const std::string msg = fmt::format("Group: {} : GECON : {} not implemented", this->group_.name(), error);
OPM_DEFLOG_THROW(std::runtime_error, msg, this->deferred_logger_);
}
} // namespace Opm

View File

@@ -37,17 +37,15 @@ class Group;
template<class Scalar> class WellState;
class WellTestState;
class GroupEconomicLimitsChecker
{
public:
GroupEconomicLimitsChecker(
const BlackoilWellModelGeneric &well_model,
WellTestState &well_test_state,
const Group &group,
class GroupEconomicLimitsChecker
{
public:
GroupEconomicLimitsChecker(const BlackoilWellModelGeneric& well_model,
WellTestState& well_test_state,
const Group& group,
const double simulation_time,
const int report_step_idx,
DeferredLogger &deferred_logger
);
DeferredLogger& deferred_logger);
void closeWells();
bool minGasRate();
bool minOilRate();
@@ -59,34 +57,42 @@ class WellTestState;
int numProducersOpenInitially();
int numProducersOpen();
void activateEndRun();
std::string message_separator(const char sep_char='*', const size_t sep_length=110) const { return std::string(sep_length, sep_char); }
std::string message_separator(const char sep_char = '*',
const size_t sep_length = 110) const
{ return std::string(sep_length, sep_char); }
static constexpr int NUM_PHASES = 3;
private:
void displayDebugMessage(const std::string &msg) const;
void addPrintMessage(const std::string &msg, const double value, const double limit, const UnitSystem::measure measure);
private:
void displayDebugMessage(const std::string& msg) const;
void addPrintMessage(const std::string& msg,
const double value,
const double limit,
const UnitSystem::measure measure);
bool closeWellsRecursive(const Group& group, int level = 0);
void throwNotImplementedError(const std::string &error) const;
const BlackoilWellModelGeneric &well_model_;
const Group &group_;
void throwNotImplementedError(const std::string& error) const;
const BlackoilWellModelGeneric& well_model_;
const Group& group_;
const double simulation_time_;
const int report_step_idx_;
DeferredLogger &deferred_logger_;
DeferredLogger& deferred_logger_;
const std::string date_string_;
const UnitSystem& unit_system_;
const WellState<double>& well_state_;
WellTestState &well_test_state_;
const Schedule &schedule_;
WellTestState& well_test_state_;
const Schedule& schedule_;
GroupEconProductionLimits::GEconGroupProp gecon_props_;
bool debug_ = true;
std::array<double,NUM_PHASES> production_rates_;
std::map<int, BlackoilPhases::PhaseIndex> phase_idx_map_ = {
{0, BlackoilPhases::Liquid},
{1, BlackoilPhases::Vapour},
{2, BlackoilPhases::Aqua}};
{2, BlackoilPhases::Aqua}
};
std::map<BlackoilPhases::PhaseIndex, int> phase_idx_reverse_map_;
std::string message_;
};
};
} // namespace Opm