From 876d1d5a5eb032a912e48c099f2989abc22060d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Tue, 19 Aug 2014 17:59:19 +0200 Subject: [PATCH] Upscaling utilities: Use raw property vectors where appropriate We need access to the raw, unconverted property vectors to use the existing algorithm for defining (e.g.,) capillary pressure ranges. This subtle point was missed during the initial transition to using the opm-parser module for input handling. --- examples/cpchop.cpp | 2 +- examples/upscale_cond.cpp | 4 ++-- examples/upscale_relperm.cpp | 10 +++++----- examples/upscale_relpermvisc.cpp | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/cpchop.cpp b/examples/cpchop.cpp index 61d97a7..37eb656 100644 --- a/examples/cpchop.cpp +++ b/examples/cpchop.cpp @@ -350,7 +350,7 @@ try // Calculate minimum and maximum water volume in each cell based on input pc-curves per rock type // Create single-phase upscaling object to get poro and perm values from the grid Opm::DeckConstPtr subdeck = ch.subDeck(); - std::vector perms = subdeck->getKeyword("PERMX")->getSIDoubleData(); + std::vector perms = subdeck->getKeyword("PERMX")->getRawDoubleData(); Opm::SinglePhaseUpscaler upscaler; upscaler.init(subdeck, bctype, minpermSI, residual_tolerance, linsolver_verbosity, linsolver_type, false); diff --git a/examples/upscale_cond.cpp b/examples/upscale_cond.cpp index c8520c0..81e51e2 100644 --- a/examples/upscale_cond.cpp +++ b/examples/upscale_cond.cpp @@ -352,8 +352,8 @@ try const int points = atoi(options["points"].c_str()); vector satnums = deck->getKeyword("SATNUM")->getIntData(); - vector poros = deck->getKeyword("PORO")->getSIDoubleData(); - vector permxs = deck->getKeyword("PERMX")->getSIDoubleData(); + vector poros = deck->getKeyword("PORO")->getRawDoubleData(); + vector permxs = deck->getKeyword("PERMX")->getRawDoubleData(); const double minPerm = atof(options["minPerm"].c_str()); const double minPoro = atof(options["minPoro"].c_str()); diff --git a/examples/upscale_relperm.cpp b/examples/upscale_relperm.cpp index 43946df..08a2200 100644 --- a/examples/upscale_relperm.cpp +++ b/examples/upscale_relperm.cpp @@ -398,9 +398,9 @@ try usageandexit(); } - vector poros = deck->getKeyword("PORO")->getSIDoubleData(); - vector permxs = deck->getKeyword("PERMX")->getSIDoubleData(); - vector zcorns = deck->getKeyword("ZCORN")->getSIDoubleData(); + vector poros = deck->getKeyword("PORO")->getRawDoubleData(); + vector permxs = deck->getKeyword("PERMX")->getRawDoubleData(); + vector zcorns = deck->getKeyword("ZCORN")->getRawDoubleData(); Opm::DeckRecordConstPtr specgridRecord = deck->getKeyword("SPECGRID")->getRecord(0); int x_res = specgridRecord->getItem("NX")->getInt(0); @@ -412,8 +412,8 @@ try if (deck->hasKeyword("PERMY") && deck->hasKeyword("PERMZ")) { anisotropic_input = true; - permys = deck->getKeyword("PERMY")->getSIDoubleData(); - permzs = deck->getKeyword("PERMZ")->getSIDoubleData(); + permys = deck->getKeyword("PERMY")->getRawDoubleData(); + permzs = deck->getKeyword("PERMZ")->getRawDoubleData(); if (isMaster) cout << "Info: PERMY and PERMZ present, going into anisotropic input mode, no J-functions\n"; if (isMaster) cout << " Options -relPermCurve and -jFunctionCurve is meaningless.\n"; } diff --git a/examples/upscale_relpermvisc.cpp b/examples/upscale_relpermvisc.cpp index 8fc34b2..779f80a 100644 --- a/examples/upscale_relpermvisc.cpp +++ b/examples/upscale_relpermvisc.cpp @@ -391,16 +391,16 @@ try exit(1); } - vector poros = deck->getKeyword("PORO")->getSIDoubleData(); - vector permxs = deck->getKeyword("PERMX")->getSIDoubleData(); + vector poros = deck->getKeyword("PORO")->getRawDoubleData(); + vector permxs = deck->getKeyword("PERMX")->getRawDoubleData(); // Load anisotropic (only diagonal supported) input if present in grid vector permys, permzs; if (deck->hasKeyword("PERMY") && deck->hasKeyword("PERMZ")) { anisotropic_input = true; - permys = deck->getKeyword("PERMY")->getSIDoubleData(); - permzs = deck->getKeyword("PERMZ")->getSIDoubleData(); + permys = deck->getKeyword("PERMY")->getRawDoubleData(); + permzs = deck->getKeyword("PERMZ")->getRawDoubleData(); if (isMaster) cout << "Info: PERMY and PERMZ present, going into anisotropic input mode, no J-functions\n"; if (isMaster) cout << " Options -relPermCurve and -jFunctionCurve is meaningless.\n"; }