mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
IsXGroup: Return Explicit Boolean Value
Mostly to highlight that 'globalIsXGrup_' holds integers rather than bools. While here, also fix an error message formatting problem.
This commit is contained in:
parent
4be4c543e7
commit
fdba34e071
@ -1066,9 +1066,9 @@ namespace Opm
|
||||
auto it = wellNameToGlobalIdx_.find(name);
|
||||
|
||||
if (it == wellNameToGlobalIdx_.end())
|
||||
OPM_THROW(std::logic_error, "Could not find global injection group for well" << name);
|
||||
OPM_THROW(std::logic_error, "Could not find global injection group for well " << name);
|
||||
|
||||
return globalIsInjectionGrup_[it->second];
|
||||
return globalIsInjectionGrup_[it->second] != 0;
|
||||
}
|
||||
|
||||
bool isProductionGrup(const std::string& name) const {
|
||||
@ -1076,9 +1076,9 @@ namespace Opm
|
||||
auto it = wellNameToGlobalIdx_.find(name);
|
||||
|
||||
if (it == wellNameToGlobalIdx_.end())
|
||||
OPM_THROW(std::logic_error, "Could not find global injection group for well" << name);
|
||||
OPM_THROW(std::logic_error, "Could not find global production group for well " << name);
|
||||
|
||||
return globalIsProductionGrup_[it->second];
|
||||
return globalIsProductionGrup_[it->second] != 0;
|
||||
}
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user