Commit Graph

916 Commits

Author SHA1 Message Date
Andreas Lauser
f83236588c GridProperties: print a (hopefully scary) warning if a grid property looses its ad-hoc status
I'm pretty sure that most users do not expect this. If that behaviour
was really intentional, one can add a

```
FOO
$NUM_CELLS*
```

line to the deck before the keyword which requires FOO to initialize
itself.
2016-02-19 13:36:53 +01:00
Andreas Lauser
442cdafeda EclipseState: make the grid properties returned by get*GridProperty() constant
that's because they are not supposed to be modified outside of the
EclipseState. (if they are, why? I'd consider that *very* bad style
since it is also possible to copy these objects and modify the copy
and also this was used nowhere within the OPM project.)

also, the has*Property() is now working as expected: if e.g.,

```c++
bool hasSatnum = eclipseState->hasIntProperty("SATNUM");
eclipseState->getIntProperty("SATNUM");
assert(hasSatnum == eclipseState->hasIntProperty("SATNUM"));
```

will now work for decks which does not explicitly specify
SATNUM. (before the getIntProperty() method silently created the
SATNUM property which caused hasIntProperty() to change its
opinion. With this patch, the property will still be silently created,
but has*Property() ignores it, i.e., that method could be renamed to
hasExplicit*Property() which -- as far as I understand this -- was its
intention from start.)
2016-02-19 13:35:45 +01:00
Jørgen Kvalsvik
7eb52f1023 Removes DeckKeyword's dependency on ParserKeyword
The completely constructed Deck isn't supposed to have any relationship
with the Parser structures (which are completely stateless in terms of
input data), and ParserKeyword in DeckKeyword was an anomaly. With
recent refactorings this lead to subtle lifetime issues.

This patch breaks this dependency and cleans up DeckKeyword accordingly,
while changing checkDeck to now take the parser as an additional
argument, to look up whether or not some DeckKeyword is in the right
section. This now also means that Parser* objects can be destroyed once
the Deck is created.

The Section::checkSectionTopology has been moved to Parser.cpp. It is a
temporary home for the feature to make the project compile nicely (i.e.
createKeywordList can be compiled as before, without introducing a
circular dependency on itself via Parser.cpp), until some proper cleanup
of the parser code has been done. It never really fully belonged in
Section.cpp anyway, so this is a first step in the direction of some
slight renaming.
2016-02-18 13:27:24 +01:00
Jørgen Kvalsvik
f0ae5db131 opm-parser adoption of Deck automatic ownership
Since the Deck* family of classes have changed their interfaces to no
longer use shared_ptr, a lot of code broke. This patch fixes all
problems in tests, other signatures and accesses to now use the new Deck
interfaces.
2016-02-18 13:27:24 +01:00
Jørgen Kvalsvik
0781ec968d Change static private methods to static functions
Since these really aren't a part of the class, they're moved to the more
approperiate static function to not pollute the header.
2016-02-18 13:26:55 +01:00
Tor Harald Sandve
710df504e2 Add support for MISCNUM
- MISCNUM is used to specify miscibility regions
2016-02-15 15:04:59 +01:00
Atgeirr Flø Rasmussen
31961cc193 Silence unused function argument warning. 2016-02-15 00:10:13 +01:00
Joakim Hove
c82dca0dd0 Added update constructor to Messages. 2016-02-05 17:35:23 +01:00
Joakim Hove
3e8c065c58 Merge pull request #675 from joakim-hove/use-ert-unique-ptr
Using unique_ptr in EclipseGrid.
2016-02-05 10:46:04 +01:00
Joakim Hove
551e65eca4 Internalize MESSAGES keyword. 2016-02-04 15:14:32 +01:00
Joakim Hove
ff1802ebb7 Reformatted test adding. 2016-02-04 15:13:40 +01:00
Joakim Hove
31c69e6702 Using unique_ptr in EclipseGrid. 2016-02-03 16:18:31 +01:00
Jørgen Kvalsvik
381e419329 Adds Schedule::getGroups()
Similar to the already-existant Schedule::getWells, this simple method
returns (const) pointers to all groups, suitable for iteration, maps and
for-all-in operations.
2016-02-01 14:20:05 +01:00
Jørgen Kvalsvik
4b98943665 Replaces unecessary header includes with fwd decls
Every header is self-contained and includes only what it must to
function, relying on users include what they need in source files,
adopting a pay-what-you-use model (in particular for internal
dependencies).
2016-01-26 13:23:22 +01:00
chflo
c365ca2c06 Tests for GEFAC keyword and WCONPROD GRUP controlmode option 2016-01-25 11:32:09 +01:00
chflo
3f266d02b7 Internalize GEFAC keyword 2016-01-25 11:32:08 +01:00
chflo
cc2b7f5f50 Support GRUP controlmode in wellProductionProperties if well is available for group control 2016-01-25 10:47:22 +01:00
Jørgen Kvalsvik
04900a4bb6 ParserKeywords.hpp -> ParserKeywordsX.hpp
To reduce compiler stress and be more explicit w.r.t. dependencies, all
files now includes only the keywords they need, instead of the
collection of all files.
2016-01-21 09:25:58 +01:00
Jørgen Kvalsvik
c85a032240 Splits tables' implementations into .cpp file
Most tables are trivial extensions of SimpleTable, but had their
implementation in headers. This required them to include more headers
than we want to expose and makes them harder to maintain and verify.
Instead, all these SimpleTable derivatives are now implemented in
Tables.cpp, only declaring their interfaces in their respective .hpp
files. Clients won't notice the difference.

rebase into tables
2016-01-21 09:23:07 +01:00
Jørgen Kvalsvik
f404828d63 Cleans up headers to improve build preformance
This is an effort to improve build performance.  Several includes
scattered across the project are either unused or partially used (i.e.
just used to import a type name, not depending on the actual contents of
the header file).

Replaces a lot of these includes with forward declarations.
2016-01-21 09:22:06 +01:00
Joakim Hove
d59b34bcb5 Added copy constructor for TableIndex. 2016-01-17 16:37:31 +01:00
Joakim Hove
a9477d057e Added function get cellDxDyDz 2016-01-08 15:36:59 +01:00
Joakim Hove
356958309c Added hasColumn() method. 2016-01-08 14:04:30 +01:00
Joakim Hove
6cff4d5aae Changed PVTO / PVTG implementation 2016-01-08 14:04:29 +01:00
Joakim Hove
a2b64a83eb SimpleTable improvements:
- Added constructor without DeckItem
 - Added addRow( ) method
 - Added random access get( ) methd.
2016-01-08 14:04:28 +01:00
Joakim Hove
874a5320e7 Changed implementation of all SimpleTable tables. 2016-01-05 12:33:19 +01:00
Joakim Hove
772473ae1c Refactored SimpleTable class 2015-12-21 15:38:49 +01:00
Joakim Hove
40ac6ec7e8 Added class TableColumn. 2015-12-21 15:38:45 +01:00
Joakim Hove
5e469c0676 Added class TableSchema with table metadata. 2015-12-21 15:31:29 +01:00
Joakim Hove
e94d01e88c Added class ColumnSchema with table metadata. 2015-12-21 15:30:54 +01:00
Joakim Hove
a85bac0034 Changes in const'ness 2015-12-21 15:30:14 +01:00
Joakim Hove
102a994190 Added TableIndex to bookkeep linear interpolation. 2015-12-21 14:52:23 +01:00
chflo
2ab9a8acdf OPM-252: Added VAPOIL, DISGAS to SimulationConfig 2015-12-15 13:50:54 +01:00
Atgeirr Flø Rasmussen
460e8c4477 Merge pull request #635 from totto82/nnc
Support for minpv-pinch-nnc
2015-12-14 11:33:16 +01:00
chflo
43216273b4 OPM-250: Added method to IOConfig to support restart 2015-12-09 14:36:09 +01:00
Tor Harald Sandve
369943461e Store the nncs in a vector of a struct rather than three vectors 2015-12-08 12:09:06 +01:00
Tor Harald Sandve
dd0689fef6 Add NNCs 2015-12-08 09:19:07 +01:00
Tor Harald Sandve
3ba7382146 Add missing methods in TableManager.cpp
Add missing methods for MSFN, PMISC, MISC, SGCWMIS and SORWMIS
2015-12-03 15:18:56 +01:00
Tor Harald Sandve
d3f3c74358 Adress minor issues
- rename checkRange() to assertUnitRange()
- use string instead of char
2015-12-01 14:12:39 +01:00
Tor Harald Sandve
dc7cf4ada6 Add missing tables 2015-12-01 13:53:05 +01:00
Tor Harald Sandve
ddcba13dfe Add support for MSFN 2015-12-01 12:19:43 +01:00
Tor Harald Sandve
9badf045a9 Add support for PMISC 2015-12-01 12:19:43 +01:00
Tor Harald Sandve
e97c6461e1 Add support for MISC 2015-12-01 12:19:43 +01:00
Tor Harald Sandve
ce595d7592 Add method to check that table input spans [0,1] 2015-12-01 12:19:43 +01:00
Tor Harald Sandve
5c35b8edeb Add support for SGCWMIS 2015-12-01 12:19:43 +01:00
Tor Harald Sandve
d151bfc83a Add support for SORWMIS 2015-12-01 12:19:42 +01:00
Joakim Hove
9346824756 ScheduleEnum will accept 'WAT' for 'WATER'. 2015-11-27 11:02:41 +01:00
Atgeirr Flø Rasmussen
0f005b8c68 Use warning suppression headers to avoid warnings from boost. 2015-11-26 10:44:22 +01:00
Atgeirr Flø Rasmussen
d87e20578c Change return type from tuple to array for getCellCenter(). 2015-11-24 14:25:37 +01:00
Kai Bao
33302f6edb moving the multi-segment related to MSW directory. 2015-11-12 12:28:08 +01:00