From 156bf0a5603eb187d67b6875a6cc6ad0fc6065e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Tue, 15 May 2012 17:19:35 +0200 Subject: [PATCH] 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. --- opm/core/WellsGroup.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opm/core/WellsGroup.cpp b/opm/core/WellsGroup.cpp index f892c83e9..d221e91e7 100644 --- a/opm/core/WellsGroup.cpp +++ b/opm/core/WellsGroup.cpp @@ -964,13 +964,13 @@ namespace Opm InjectionSpecification::InjectorType toInjectorType(std::string type) { - if (type == "OIL") { + if (type[0] == 'O') { return InjectionSpecification::OIL; } - if (type == "WATER") { + if (type[0] == 'W') { return InjectionSpecification::WATER; } - if (type == "GAS") { + if (type[0] == 'G') { return InjectionSpecification::GAS; } THROW("Unknown type " << type << ", could not convert to SurfaceComponent");