mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
toInjectorType(): Distinguish types based on first characters only.
The manual states that injection types in the "WCONINJE" keyword need only be specified using a single character.
This commit is contained in:
parent
83274c4027
commit
156bf0a560
@ -964,13 +964,13 @@ namespace Opm
|
|||||||
|
|
||||||
InjectionSpecification::InjectorType toInjectorType(std::string type)
|
InjectionSpecification::InjectorType toInjectorType(std::string type)
|
||||||
{
|
{
|
||||||
if (type == "OIL") {
|
if (type[0] == 'O') {
|
||||||
return InjectionSpecification::OIL;
|
return InjectionSpecification::OIL;
|
||||||
}
|
}
|
||||||
if (type == "WATER") {
|
if (type[0] == 'W') {
|
||||||
return InjectionSpecification::WATER;
|
return InjectionSpecification::WATER;
|
||||||
}
|
}
|
||||||
if (type == "GAS") {
|
if (type[0] == 'G') {
|
||||||
return InjectionSpecification::GAS;
|
return InjectionSpecification::GAS;
|
||||||
}
|
}
|
||||||
THROW("Unknown type " << type << ", could not convert to SurfaceComponent");
|
THROW("Unknown type " << type << ", could not convert to SurfaceComponent");
|
||||||
|
Loading…
Reference in New Issue
Block a user