Commit Graph

993 Commits

Author SHA1 Message Date
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
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
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
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
Atgeirr Flø Rasmussen
03a74ade2d Make getPinchThresholdThickness() throw if isPinchActive() is false. 2014-08-20 09:34:44 +02:00
Atgeirr Flø Rasmussen
9d22253166 Add test for pinch features of EclipseGrid. 2014-08-20 09:25:16 +02:00
Atgeirr Flø Rasmussen
4529cbe468 Add isPinchActive() and getPinchThresholdThickness() members.
Now reading the optional PINCH keyword from the GRID section.
2014-08-20 09:23:32 +02:00
Atgeirr Flø Rasmussen
499afaf795 Also add dimension to MAX_EMPTY_GAP property. 2014-08-20 08:41:24 +02:00
Atgeirr Flø Rasmussen
afd6a429af Add dimension (length) to THRESHOLD_THICKNESS item. 2014-08-19 23:15:34 +02:00
Joakim Hove
c06e1bebbf Added new EclipseGrid constructor
The new EclipseGrid constructor EclipseGrid(nx,ny,nz , GridSection)
allows the construction of a GRID without the RUNSPEC section.
2014-08-19 08:25:10 +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
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
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
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