make toString() method as static.

This commit is contained in:
Liu Ming 2016-05-24 09:07:28 +08:00
parent 7eba8b01f5
commit 94ee69505a
3 changed files with 8 additions and 8 deletions

View File

@ -26,9 +26,9 @@ namespace Opm
};
InjectionSpecification();
std::string toString(const ControlMode& mode);
std::string toString(const InjectorType& type);
std::string toString(const GuideRateType& type);
static std::string toString(const ControlMode& mode);
static std::string toString(const InjectorType& type);
static std::string toString(const GuideRateType& type);
InjectorType injector_type_;
ControlMode control_mode_;
double surface_flow_max_rate_;

View File

@ -26,9 +26,9 @@ namespace Opm
};
ProductionSpecification();
std::string toString(const ControlMode& mode);
std::string toString(const Procedure& type);
std::string toString(const GuideRateType& type);
static std::string toString(const ControlMode& mode);
static std::string toString(const Procedure& type);
static std::string toString(const GuideRateType& type);
ControlMode control_mode_;
Procedure procedure_;

View File

@ -345,7 +345,7 @@ namespace Opm
mode);
if (my_rate > target_rate) {
OpmLog::warning("Group " + injSpec().toString(mode)
OpmLog::warning("Group " + InjectionSpecification::toString(mode)
+ " target not met for group " + name() + "\n"
+ "target = " + std::to_string(target_rate) + "\n"
+ "rate = " + std::to_string(my_rate));
@ -378,7 +378,7 @@ namespace Opm
child_phases_summed.surf_prod_rates,
mode);
if (std::fabs(my_rate) > target_rate) {
OpmLog::warning("Group" + prodSpec().toString(mode)
OpmLog::warning("Group" + ProductionSpecification::toString(mode)
+ " target not met for group " + name() + "\n"
+ "target = " + std::to_string(target_rate) + '\n'
+ "rate = " + std::to_string(my_rate));