Commit Graph

1266 Commits

Author SHA1 Message Date
Joakim Hove
39d43158de Merge pull request #276 from andlaus/better_regex_test
make the regex test more thorough
2014-08-12 06:42:00 +02:00
Joakim Hove
56951b4f63 Merge pull request #275 from andlaus/add_FGIT
add the FGIT keyword to the FIELD_PROBE
2014-08-08 19:01:20 +02:00
Andreas Lauser
e06114c35a make the regex test more thorough
it seems like the std::regex delivered up to gcc 4.8 has problems with
constructs such as ".+". (at least if they appear at the end of a
regex...)
2014-08-08 16:13:00 +02:00
Andreas Lauser
e08ecd6fd9 add the FGIT keyword to the FIELD_PROBE
This is used by Norne, but for some reason it was not included in the
deck_names list...
2014-08-08 13:35:31 +02:00
Joakim Hove
fc24206dbb Merge pull request #273 from andlaus/allow_static_ERT
Allow static ert
2014-08-07 20:24:56 +02:00
Joakim Hove
f313990fea Merge pull request #274 from atgeirr/default-wellrefdepth
Correctly handle defaulted well reference depths
2014-08-07 17:39:22 +02:00
Atgeirr Flø Rasmussen
5aa037799a Update checkWELSPECSConsistency() method.
Now accounts for new refDepthDefaulted() method and semantics.
2014-08-07 17:00:22 +02:00
Atgeirr Flø Rasmussen
15ee739326 Change Well constructors to avoid explicit bool arg.
Suggested by Joakim Hove.
2014-08-07 16:59:40 +02:00
Atgeirr Flø Rasmussen
6dfeadc229 Adapt tests to use new Well constructor, add test for defaulted ref depth. 2014-08-07 12:35:21 +02:00
Atgeirr Flø Rasmussen
ad93424b6a Add refDepthDefaulted field to Well class. 2014-08-07 12:34:49 +02:00
Andreas Lauser
466a18da98 fix some harmless compiler warnings
this comes with a minor API change as well, as the FaultCollection
class did not use the Cartesian size of the grid at all, so I decided
to remove the attributes and the arguments to the constructor...
2014-08-06 21:47:50 +02:00
Andreas Lauser
37df21ed41 ERT: link to the threads library of the OS
this is required to make the opm-core build succeed if ERT was build
with -DBUILD_SHARED_LIBS=OFF . (without it, I get errors like

    /home/and/src/ert/devel/libert_util/src/thread_pool_posix.c:328: error: undefined reference to 'pthread_create'
2014-07-30 14:54:38 +02:00
Arne Morten Kvarving
ffd2eb1d73 fixed: ERT depends on libdl
this issue was triggered with static libs for ERT
2014-07-25 15:07:39 +02:00
Joakim Hove
069ceaa9b7 Added new method EclipseState::getEclipsegridcopy() 2014-07-17 21:20:42 +02:00
Joakim Hove
8ff5a91a4f Added constructor based on existing ecl_grid_type pointer 2014-07-17 21:20:09 +02:00
Joakim Hove
1737afb823 Added bool flag to ert function ecl_grid_compare() 2014-07-17 21:19:30 +02:00
Joakim Hove
e041cf337c Added c_ptr() method to EclipseGrid 2014-07-16 12:29:31 +02:00
Joakim Hove
b41e66594e Merge pull request #268 from joakim-hove/EclipseGrid-reset-actnum
Eclipse grid reset actnum
2014-07-16 09:48:01 +02:00
Joakim Hove
7a52e0c2ce Added EclipseGrid::fwriteEGRID
In addition an new constructor based on an existing binary GRID/EGRID
file.
2014-07-16 09:35:06 +02:00
Joakim Hove
040107d215 Added method EclipseGrid::resetACTNUM() 2014-07-16 09:21:05 +02:00
Andreas Lauser
38867de28c EclipseState: extend test to check the TransMult class 2014-07-15 16:47:31 +02:00
Andreas Lauser
abb49aead6 TransMult: implement non-fault transmissibility multipliers
i.e., the MULT[XYZ]-? keywords.
2014-07-15 16:47:31 +02:00
Andreas Lauser
9eda5bad44 GridProperty: mark getData() as const
it returns a const reference to a vector which does not allow
manipulation of its members. the getData() can thus be safely called
on constant GridProperty objects.
2014-07-15 16:47:31 +02:00
Andreas Lauser
523d5d049f fix ugly bug which prevented deck keyword names from having a minus in them
i.e. MULT[XYZ]- was trimmed to MULT[XYZ]. Also, the RawKeyword now
uses ParserKeyword::isValidDeckName() instead of a regular expression
which makes it automatically consistent and also should make it
slightly faster...
2014-07-15 16:47:31 +02:00
Kristian Flikka
697c273c19 OPM-94: Removed specialized int,double,string implementations, one generic covers the same 2014-07-10 13:24:49 +02:00
Joakim Hove
d6594c587f Added method GridProperty<T>::multiplyValueAtIndex 2014-07-10 12:00:30 +02:00
Kristian Flikka
766ed83a2b Added hasEDIT test, to avoid exception on decks without EDIT section 2014-07-09 13:27:26 +02:00
Joakim Hove
c4cd20f9f2 ERT-700: Included Fault treatment in EclipseState 2014-07-08 17:29:12 +02:00
Joakim Hove
5411f9ec74 Added internal MULTXYZ fields to TransMult 2014-07-08 17:26:44 +02:00
Joakim Hove
61c4e677c5 ERT-700: Added FaultCollection class 2014-07-08 17:26:37 +02:00
Joakim Hove
e319aefacb Added Fault class 2014-07-08 17:16:02 +02:00
Joakim Hove
c2e06ad7a8 Added FaultFace class 2014-07-08 17:16:02 +02:00
Joakim Hove
7a448752f4 Removed const from getData() 2014-07-08 17:16:02 +02:00
Joakim Hove
bcb84c7e57 Trivial whitespace change 2014-07-08 17:16:02 +02:00
Joakim Hove
08b27b3f61 Added missing compile guard to OrderedMap 2014-07-08 17:16:02 +02:00
Joakim Hove
29df8e9f89 Added count() method to Section class 2014-07-08 17:16:02 +02:00
Joakim Hove
1669138bf6 Added missing EDIT keyword to testdata. 2014-07-08 17:16:02 +02:00
Bård Skaflestad
92c179f4d3 Prediction mode: Support GRUP control
If a well is available for group control, we should add that control
mode to its Injection or ProductionProperties before assigning a new
current (active) control mode to the well ('.controlMode').

Suggested by: [at] joakim-hove.
2014-07-08 13:22:46 +02:00
Bård Skaflestad
ef5a9e8e1a Refactor WellProductionProperties manipulation code
This commit splits the creation of WellProductionProperties objects,
and especially the ad-hoc helper functions historyProperties()
and predictionProperties() out to a separate module,
WellProductionProperties.[hc]pp.  Creating the properties object
from a DeckRecordConstPtr is deferred to two named constructors,

    WellProductionProperties::history() and
    WellProductionProperties::prediction()

that, respectively, assume the roles of historyProperties() and
predictionProperties().  Reimplement handleWCONProducer() in terms
of these named constructors and remove the producerProperties()
helper whose task, inspecting the status and retrieving/setting the
CMODE if not SHUT, can be assumed by handleWCONProducer().

Add a simple test module, WellPropertiesTest.cpp, to enforce the
rather peculiar semantics of the WCONHIST keyword.  Control modes
{O,W,G}RAT, LRAT, and RESV are *always* (unconditionally) supported
in WCONHIST but there is no control mode switching.  The latter is
deferred to client code, depending on the '.predictionMode' flag.

Suggested by: [at] joakim-hove
2014-07-08 13:22:46 +02:00
Bård Skaflestad
93c133a7b8 historyProperties(): Extract BHP limit if not defaulted
This fixes a programming error introduced in the refactoring of
Schedule::handleWCONProducer() (commit 3889e92).  When there is a BHP
limit in WCONHIST, we obviously need the value specified in the input
deck.  The refactoring led to the limit being extracted only in the
prediction mode.

Pointy hat: [at] bska
2014-07-08 13:22:46 +02:00
Bård Skaflestad
e23659b286 historyProperties(): Add note on numerically zero defaults
This is a hint to a future maintainers that the subsequent control
modes are unconditionally supported.
2014-07-08 13:22:46 +02:00
Bård Skaflestad
07c7b59702 Rename helper: matchingProperties() -> historyProperties()
This more clearly reflects its actual purpose.

Suggested by: [at] joakim-hove
2014-07-08 13:22:45 +02:00
Bård Skaflestad
1111f87aa7 *Properties(): Rename control mode (enum) variable
Four characters (cmod) is less readable than "cmode".

Suggested by: [at] joakim-hove
2014-07-08 13:22:45 +02:00
Bård Skaflestad
cb3a196446 *Properties(): Switch to vector<string> for control modes
Update mode iteration accordingly.

Suggested by: [at]joakim-hove
2014-07-08 13:22:45 +02:00
Bård Skaflestad
1d34629cc2 Disable WCONHIST/GRAT non-existence test
Keyword WCONHIST always supports GRAT control mode, even when
defaulted.  The default value (zero) might not be very useful in a
simulation case but it's supported nonetheless.
2014-07-08 13:22:45 +02:00
Bård Skaflestad
3242976bf1 Refine semantics of WCONHIST implementation
This commit splits Schedule::handleWCONProducer() into those parts
that are specific to the individual keywords (WCONHIST/matching and
WCONPROD/prediction) and those that are common to both.

In particular we introduce two new helper functions

    matchingProperties() and predictionProperties()

of which the first constructs a WellProductionProperties object
specific to matching semantics and the latter constructs a similar
object specifc to prediction.  In the case of WCONHIST, the well
always supports component rates at surface conditions ({O,W,G}RAT)
as well as liquid rate (LRAT) and (total) reservoir volume rate
(RESV).  The prediction mode keeps the existing semantics of not
supporting control modes for which the values have been defaulted.

The final helper, function producerProperties(), dispatches to
matchingProperties() or predictionProperties() depending on
handleWCONProducer()'s 'isPredictionMode' flag and handles the
record properties that are common to both WCONHIST and WCONPROD,
including whether or not to assign a new active control mode.

The end result is that handleWCONProducer() becomes a loop of
keyword data records that

  1) Determines the wells affected by a given record
  2) Determines whether or not the wells are OPEN
  3) Computes control mode properties (producerProperties())
  4) Assigns status and those properties to all affected wells

This approach reorders the well loop compared to the previous
implementation which computed separate WellProductionProperties for
each well.
2014-07-08 13:22:45 +02:00
Andreas Lauser
3dac72d821 use extended regular expressions in the test for std::regex
for some compilers (e.g., GCC < 4.9) the default is buggy and
opm-parser thus uses extended expressions...

thanks to [at]bska for digging this up!
2014-07-08 13:01:20 +02:00
Kristian Flikka
e8310ffbca Changed from if to ifdef, to clarify the actual functionality 2014-07-08 12:49:12 +02:00
Andreas Lauser
1a72cade01 use std::regex if it is available
it turns out that boost::regex does not work for the libstdc++ debug
mode. This patch should fix this for sufficiently new compilers.

Note that this requires the FindCXX11Features.cmake tests pulled in
from opm-core and an additional compiler flag...
2014-07-07 17:50:46 +02:00
Andreas Lauser
f754bd9c45 fix some screw-up with internal vs deck names
Parser::hasKeyword() was called with deckNames but looked up the map
for internal names. This patch renames the method to hasDeckName(),
renames Parser::getKeyword() to Parser::getKeywordFromDeckName() and
adapts/extends the tests.
2014-07-01 17:07:43 +02:00