Commit Graph

1272 Commits

Author SHA1 Message Date
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
Joakim Hove
0b01c2d65f Merge pull request #287 from atgeirr/add-minpv
Add MINPV features to EclipseGrid
2014-08-25 14:22:00 +02:00
Andreas Lauser
c2329b72ba add a few missing includes
these includes are required by the headers. If the affected files
would have been included without the headers included before, a
compiler error would have been produced.
2014-08-25 14:07:28 +02:00
Atgeirr Flø Rasmussen
da50b320fa Add MINPV features to EclipseGrid class. 2014-08-25 11:15:39 +02:00
Atgeirr Flø Rasmussen
8a95b89bfb Add LiquidVolume dimension to MINPV keyword. 2014-08-25 11:15:15 +02:00
Atgeirr Flø Rasmussen
5300f75c05 Fix the NullStream class.
It is the std::streambuf that should be inherited from.
The NullStream class is just a convenience class.
2014-08-22 19:46:02 +02:00
Joakim Hove
9d92ba5648 Merge pull request #284 from atgeirr/new-eclipsegrid-constructor
Add new EclipseGrid constructor taking a Deck.
2014-08-22 18:09:52 +02:00
Andreas Lauser
166cd965e9 considerably extend the unit test for sections
for this, an Section::isDeckValid() method is introduced which checks
that a given deck is valid when it comes to the sections
(i.e. presence of mandatory sections and section ordering)
2014-08-22 17:26:01 +02:00
Andreas Lauser
3566b99b85 relax strictness of the section handling and fix/work around a few bugs
We now do not require the sections to be correctly ordered and the
presence of the mandatory sections since even the unit tests did not
always specify all mandatory sections, which lead to a section
containing the rest of the deck if one of the expected next sections
was not specified.

also it seems like the DeckKeyword::getDeckIndex() does not correctly
work in some situations which lead

assert(deck->getKeyword(i)->name() == startKeyword);

to fail in the Section::populateKeywords() method. now the deck is
always sequentially traversed to find the position of a section's
start keyword. (This is necessary anyway if one wants to make sure
that the deck does not specify the same section more than once, a
feature which this patch also adds.)
2014-08-22 17:25:44 +02:00
Atgeirr Flø Rasmussen
52c7a4bc3f Remove section-using EclipseGrid constructors.
Also:
 - Simplify implementation (no templates).
 - Update tests.
2014-08-22 12:12:37 +02:00
Atgeirr Flø Rasmussen
eaea25772e Create pointer-to-const objects.
Older gcc (4.4) does not allow conversion of shared_ptr<Foo> to
shared_ptr<const Foo>. Pointed out by @bska.
2014-08-21 15:13:50 +02:00
Atgeirr Flø Rasmussen
193e3d7012 Added test case for construction from deck with no sections. 2014-08-21 13:19:34 +02:00
Atgeirr Flø Rasmussen
4253fb151b Allow DIMENS to be used as well as SPECGRID when no sections are found.
Also refactor DIMENS/SPECGRID to dimension code as a function.
2014-08-21 13:14:03 +02:00
Atgeirr Flø Rasmussen
d3a2db6867 Add new constructor taking a Deck.
The new constructor allows us to create EclipseGrid objects from decks
that do not have a strict sectioned structure.

Also modify some implementation details. Many methods are now templates,
and can take Deck or Section objects (they have the same
hasKeyword/getKeyword interface).
2014-08-21 10:30:47 +02:00
Joakim Hove
e406e91629 Merge pull request #279 from andlaus/set_more_flag_variables
configure: also set the CMAKE_C*_FLAGS_DEBUG and CMAKE_C*_FLAGS_RELEASE ...
2014-08-20 22:59:20 +02:00
Atgeirr Flø Rasmussen
577f8a7088 Name magic constant (invalidThickness). 2014-08-20 13:38:46 +02:00
Atgeirr Flø Rasmussen
f831637a5f Follow opm-parser naming conventions for data members. 2014-08-20 13:05:21 +02:00
Andreas Lauser
a0039eae8a configure: also set the CMAKE_C*_FLAGS_DEBUG and CMAKE_C*_FLAGS_RELEASE of CXX_FLAGS is specified
for me, setting only CMAKE_CXX_FLAGS did not do the trick when I was
trying to compile everyting with libstdc++'s debug mode enabled. (it
caused linker errors because opm-parser was not linked against
std::debug in this case.) Maybe I got something wrong, though...
2014-08-20 11:28:17 +02:00
Atgeirr Flø Rasmussen
26d57d7ec1 More tests for proper pinch-related behaviour.
Now also check behaviour for no-pinch case.
2014-08-20 09:35:21 +02:00