Commit Graph

1290 Commits

Author SHA1 Message Date
Andreas Lauser
f440f34788 remove RockTable
because ROCK is not a table keyword
2014-09-19 12:07:06 +02:00
Andreas Lauser
c5f78788e0 add the IMPTVD and IMKRVD keywords and table classes
basically they are just renamed copies of the EN* variants...
2014-09-19 12:07:05 +02:00
Andreas Lauser
7f786a7ccc add the ROCKOPTS keyword
because to properly initialize the ROCKTAB table, it is required...
2014-09-19 12:07:05 +02:00
Andreas Lauser
ef6e76562b Deck: mark numKeywords() and getKeywordList() as const
this was probably an oversight...
2014-09-19 12:07:05 +02:00
Andreas Lauser
eccf3d4551 ParserItem: improve the equallity testing code and remove the defaultSet() method
but we still need the m_defaultSet member because NaN == NaN as well
as NaN != NaN...
2014-09-15 12:29:58 +02:00
Andreas Lauser
435e6aa6c5 extend "StarToken" class
that's because not every token which contains a star represents an
repetion, e.g.

'PROD*'

and

'123*456'

(with the quotes) are strings...
2014-09-15 12:27:28 +02:00
Andreas Lauser
6dbe6ae5ac remove the "value status" concept from deck items
I know it was only added recently, but all of the "setInDeck()" calls
can now be substituted by a combination of item->size() and
item->defaultApplied(index)...
2014-09-15 12:17:04 +02:00
Andreas Lauser
16337759b6 add some defaulted values to the unit test of PVTG 2014-09-15 12:17:03 +02:00
Andreas Lauser
e014896e35 add more explicit unit test for defaulted deck items
(the ParserItemTests already have one (Scan_All_WithDefaults) but a
second one won't hurt...)
2014-09-15 12:17:03 +02:00
Andreas Lauser
b72df6f406 make ParserItems always defaultable
i.e. remove the defaultSet() method and its friends. this is required
to be able to specify defaults in DATA items like grid properties or
saturation tables. e.g.

SGL
10*0.1 10* 10*0.2 /

would not be possible without this. If no meaningful default for an
item is defined, float and double items get NaN, int items get -1 and
string ones get an empty string. The hope is that if these values get
used in the simulation, they will make the result obviously
incorrect. (Whether a data point of an item was defaulted can be
queried using item->defaultApplied(index).)
2014-09-15 12:17:03 +02:00
Andreas Lauser
539c7a23ae make the defaults of an item settable per data point
instead of for the whole item...
2014-09-15 12:17:03 +02:00
Andreas Lauser
e6fa1e01a8 DeckItem: add indices to the methods which allow to query the defaulted status
also, this renames DeckItem::setInDeck() to DeckItem::wasSetInDeck()
because the former method can easily be confused with a setter method
(which it is not, it is a 'getter').

note that there is a small semantical difference now: the old
signatures specified the status of the whole *item* while the new
variants are specific for a single *data point* of an item. Though at
this point the index passed to the methods is still disregarded..
2014-09-15 12:17:03 +02:00
Andreas Lauser
09d9508c39 remove the 'ParserBoolItem.[ch]pp' files
they were empty and as far as I can see, Eclipse does not have the
concept of boolean items...
2014-09-15 12:17:03 +02:00
Joakim Hove
981d63e1ac Fixed dimension of Kh item to Permeability*Length 2014-09-09 14:11:37 +02:00
Andreas Lauser
76b8cc6e4f EclipseState: provide an accessor method for the unit system used by the deck
this is required to convert calculated quantities to the same units as
the ones used in the input deck.
2014-09-09 12:16:13 +02:00
Andreas Lauser
66139d9f07 fix compiler warnings and rename CF to ConnectionTransmissibilityFactor
for the compiler warnings, see e.g.

https://opm-project.org/CDash/viewBuildError.php?type=1&buildid=27777

the CF to ConnectionTransmissibilityFactor rename makes things much easier to
understand for people who are not intimately familiar with the wells
code.
2014-09-06 22:18:55 +02:00
Joakim Hove
152e07775a Merge pull request #294 from andlaus/GridProperties_first_int_then_double
first handle all integer properties, then all double ones
2014-09-05 14:42:22 +02:00
Joakim Hove
2b114b8b46 Removed explicit default value from two config items. 2014-09-05 12:31:57 +02:00
Andreas Lauser
09d149b0c7 Removed all trailing spaces from JSON 2014-09-05 11:01:44 +02:00
Andreas Lauser
b2570ef216 remove some keywords which are already covered by *_PROBE 2014-09-05 10:58:10 +02:00
Andreas Lauser
e73af3d182 REGION_PROBE: add more user defined keywords
these are not really documented, but they are used by the file
./INCLUDE/SUMMARY/extra.inc of the Norne deck. I don't know why this
did not bite anyone so far, probably people just commented out the
INCLUDE statement of this file...
2014-09-05 10:58:06 +02:00
Andreas Lauser
1f618ed546 add a PERFORMANCE_PROBE parser keyword
this contains all performance monitoring keywords like TCPU or PERFORMA
2014-09-05 10:57:59 +02:00
Joakim Hove
be32f91004 Changed Completion to use Value<double>. 2014-09-04 22:10:16 +02:00
Joakim Hove
f88fd65937 Implemented PINCH and MINPV as Value<double> 2014-09-04 22:10:16 +02:00
Joakim Hove
c08770c853 Added class Value<T>
The class Value<T> will keep track of a named variable, and whether that
particular value has been explicitly initialized. Will throw
std::logic_error if trying to use an unitialized value.
2014-09-04 22:10:09 +02:00
Joakim Hove
c1f42aee64 Moved OrderMap to EclipseState/Util 2014-09-04 14:09:33 +02:00
Joakim Hove
fedc3387fd Default: Added dataset from opm-core with test 2014-09-03 10:37:02 +02:00
Joakim Hove
544b6db1c0 Default: Added method hasValue() 2014-09-03 10:37:02 +02:00
Joakim Hove
52846a0761 Default: Explicitly set default values in config 2014-09-03 10:37:02 +02:00
Joakim Hove
e120c161c4 Default: Changes for default applied. 2014-09-03 10:37:01 +02:00
Joakim Hove
9cd30b8c7a Default: Removed invalid default value. 2014-09-03 10:37:01 +02:00
Joakim Hove
32d2901b0f Default: Split options keyword to have 197 items 2014-09-03 10:37:01 +02:00
Joakim Hove
b161bd6fc2 Default: Explicitly added default == 0 for box 2014-09-03 10:37:01 +02:00
Joakim Hove
d6fa1449af Default: Changed size_type: ALL -> SINGLE 2014-09-03 10:37:01 +02:00
Joakim Hove
cec42ff8d9 Default: Using setInDeck() instead of relying on size == 1 2014-09-03 10:37:01 +02:00
Joakim Hove
aa36738f04 Default: DeckItem will throw if you ask for missing data 2014-09-03 10:37:01 +02:00
Joakim Hove
61cdf7d402 Default: defaultApplied -> setInDeck()
The data values in a deck item can be in three different states, given
by the DeckValue enum in DeckItem.hpp. The three values are:

  SET_IN_DECK : The value has been set explictly in the deck.
  DEFAULT     : The value was not present in the input deck, but a default
                value has been supplied in the configuration and that value
                has been set.
  NOT_SET     : No value has been set for this item; it was not explicitly
                set in the deck and also not included in the configuration.

If you ask for DeckItem->value which is in state NOT_SET you will get an
exception. The method setInDeck() can be used to check if a value has
been set explicitly in the deck; the method defaultApplied() will check
if a default value has been applied.

Observe that the system for handling defaults is not really well suited
for multi valued data items, as it is only a scalar state variable. In
the case of multi valued data items both defaultApplied() and
setInDeck() might return true.
2014-09-03 10:37:01 +02:00
Joakim Hove
cebf991210 Default: Updates to the scan routine. 2014-09-03 10:37:01 +02:00
Joakim Hove
bf35919c6f Default: Changed default handling in ParserItem
This is the first of several large commits changing several aspects of
the handling of defaults. The overall main purpose of these changes is
to protect against using non sensible values in the case the values have
not been sensibly specified in the deck. The changes in this commit
include:

 1. The "default default" values to be used when an item without an
    explicit default are defaulted are removed completely.

 2. If a ParserItem is queried for a default value when no default has
    been assigned it will raise an exception.
2014-09-03 10:37:00 +02:00
Joakim Hove
be0558607c Default: Changed defaultApplied bool to enum
We now have an enum which can keep track of three possible states for
the data in a deck item:

  VALID   : A valid value has been set
  DEFAULT : The default value has been applied
  NOT_SET : The value has not been set.

The intention is to throw if/when a DeckItem with status == NOT_SET is
accessed.
2014-09-03 10:37:00 +02:00
Joakim Hove
6c7b613111 Default: Implemented ParserxxxItem::scan() with template 2014-09-03 10:37:00 +02:00
Joakim Hove
8b2981283f Default: Updates to ParserItem::equal()
1. The boolean flag m_defaultSet() is included in the actual
    comparison.

 2. The compare functions is implemented as a functions template.
2014-09-03 10:37:00 +02:00
Joakim Hove
de73c688e3 Removed debug output clutter 2014-09-03 10:37:00 +02:00
Joakim Hove
8f54c4e555 GroupTree::prinTree() takes std::ostream argument 2014-09-03 10:37:00 +02:00
Bård Skaflestad
422d37b138 Capture and provide completion direction
This is needed for clients to act intelligently in the presence of
horizontal completions (in the context of deviated wells).
2014-08-31 21:23:18 +02:00
Andreas Lauser
afa93d67b3 first handle all integer properties, then all double ones
this is required in situations where double grid properties depend on
the values of integer (i.e, *NUM) ones which appear later in the
deck. Example:

```
PROPS

SWU
* /

REGIONS

SATNUM
*2 /
```

the default value of the SWU keyword depends on the value of the
SATNUM property which only gets defined later in the deck. an
alternative to the approach of this patch would be to process the
grid properties of the REGIONS section before the others. I'm a bit
indifferent which approach is better...
2014-08-28 12:19:31 +02:00
Atgeirr Flø Rasmussen
1d66b2d04d Add dimension to the threshold pressure. 2014-08-27 17:37:17 +02:00
Joakim Hove
1f77c8251d Merge pull request #288 from andlaus/be_strict_by_default
EclipseState: require the canonical section topology
2014-08-26 21:36:16 +02:00
Andreas Lauser
b690d9add8 EclipseState: check the canonical section topology
at least if the "beStrict" parameter for the constructor is set to
true. by default nothing changes...
2014-08-26 12:29:17 +02:00
Andreas Lauser
180a4db1d5 work around an optimizer performance bug in clang.
It seems like some optimization passes of CLang which are enabled by
-O2 (at least in my version, 3.3) do not like nested scopes and long
functions too much. Thus, slightly change the generated source. Timing
on my (quite beefy) machine:

without patch:

make
rm -rf generated-source; time make
time make
[...]
real    10m31.110s
user    10m16.264s
sys     0m13.672s

with patch:

make
rm -rf generated-source; time make
time make
[...]
real    0m47.011s
user    0m44.670s
sys     0m1.968s

the memory used by the compiler goes from 28.8GB to about 330 MB. (I
suppose not everybody has 32 Gigs of memory yet. ;)
2014-08-25 16:08:27 +02:00