Commit Graph

1286 Commits

Author SHA1 Message Date
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
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
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