This commit is contained in:
Atgeirr Flø Rasmussen 2012-05-16 12:55:05 +02:00
commit a6c71288aa
4 changed files with 11 additions and 13 deletions

View File

@ -962,15 +962,15 @@ namespace Opm
namespace namespace
{ {
InjectionSpecification::InjectorType toInjectorType(std::string type) InjectionSpecification::InjectorType toInjectorType(const 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");
@ -1076,11 +1076,6 @@ namespace Opm
if (deck.hasField("WCONPROD")) { if (deck.hasField("WCONPROD")) {
WCONPROD wconprod = deck.getWCONPROD(); WCONPROD wconprod = deck.getWCONPROD();
#if THIS_STATEMENT_IS_REALLY_NEEDED
std::cout << wconprod.wconprod.size() << std::endl;
#endif
for (size_t i = 0; i < wconprod.wconprod.size(); i++) { for (size_t i = 0; i < wconprod.wconprod.size(); i++) {
if (wconprod.wconprod[i].well_ == name) { if (wconprod.wconprod[i].well_ == name) {
WconprodLine line = wconprod.wconprod[i]; WconprodLine line = wconprod.wconprod[i];

View File

@ -467,17 +467,17 @@ namespace Opm
// Set well component fraction. // Set well component fraction.
double cf[3] = { 0.0, 0.0, 0.0 }; double cf[3] = { 0.0, 0.0, 0.0 };
if (wci_line.injector_type_ == "WATER") { if (wci_line.injector_type_[0] == 'W') {
if (!pu.phase_used[BlackoilPhases::Aqua]) { if (!pu.phase_used[BlackoilPhases::Aqua]) {
THROW("Water phase not used, yet found water-injecting well."); THROW("Water phase not used, yet found water-injecting well.");
} }
cf[pu.phase_pos[BlackoilPhases::Aqua]] = 1.0; cf[pu.phase_pos[BlackoilPhases::Aqua]] = 1.0;
} else if (wci_line.injector_type_ == "OIL") { } else if (wci_line.injector_type_[0] == 'O') {
if (!pu.phase_used[BlackoilPhases::Liquid]) { if (!pu.phase_used[BlackoilPhases::Liquid]) {
THROW("Oil phase not used, yet found oil-injecting well."); THROW("Oil phase not used, yet found oil-injecting well.");
} }
cf[pu.phase_pos[BlackoilPhases::Liquid]] = 1.0; cf[pu.phase_pos[BlackoilPhases::Liquid]] = 1.0;
} else if (wci_line.injector_type_ == "GAS") { } else if (wci_line.injector_type_[0] == 'G') {
if (!pu.phase_used[BlackoilPhases::Vapour]) { if (!pu.phase_used[BlackoilPhases::Vapour]) {
THROW("Water phase not used, yet found water-injecting well."); THROW("Water phase not used, yet found water-injecting well.");
} }

View File

@ -19,7 +19,8 @@
#include <opm/core/fluid/RockFromDeck.hpp> #include <opm/core/fluid/RockFromDeck.hpp>
#include <opm/core/eclipse/EclipseGridInspector.hpp>
#include <tr1/array>
namespace Opm namespace Opm
{ {

View File

@ -606,6 +606,8 @@ compute_cell_contrib(struct UnstructuredGrid *G ,
pimpl->ratio->mat_row[ 0 ] += s * dt * dF1; pimpl->ratio->mat_row[ 0 ] += s * dt * dF1;
pimpl->ratio->mat_row[ off ] += s * dt * dF2; pimpl->ratio->mat_row[ off ] += s * dt * dF2;
dv += 2 * np; /* '2' == number of one-sided derivatives. */
} }
} }
} }