Commit Graph

122 Commits

Author SHA1 Message Date
Pål Grønås Drange
091dc196f3 Added parse functions for Parser, for simpler creation of state and grids 2016-05-06 12:21:41 +02:00
Pål Grønås Drange
b8b1ba9528 ParseContext is now a member of EclipseState
* EclipseState now copies input ParseContext and keeps it as member
* Made the argument (ParseContext) default as ParseContext()
* Now you can make a new EclipseState with only deck as argument
* Removed test that tested address equality of ParseContext objects
2016-05-06 11:37:26 +02:00
Pål Grønås Drange
5a7dcc5427 Made FaultCollection reference in State thereby fixing compiler warn 2016-05-03 13:22:57 +02:00
Pål Grønås Drange
63e452167c Introduce deckptr-less EclipseState and EclipseGrid 2016-05-03 13:22:56 +02:00
Liu Ming
c42cfafc90 Merge remote-tracking branch 'remotes/opm/master' into MessageContainer-sub-class
Conflicts:
	opm/parser/eclipse/EclipseState/EclipseState.cpp
	opm/parser/eclipse/EclipseState/Grid/EclipseGrid.cpp
2016-04-22 14:53:16 +08:00
Pål Grønås Drange
444f74642c Refactored EclipseState.getEclipseGrid to getInputGrid 2016-04-19 16:47:05 +02:00
Pål Grønås Drange
aaf0a2fcbc Renamed m_eclipseGrid to m_inputGrid internally in EclipseState 2016-04-19 13:06:37 +02:00
Pål Grønås Drange
ba01b7eb53 Fixes support for BOXed ACTNUM
* Added ACTNUM as keyword to Eclipse3DProperties
* Removed certain checks from EclipseGrid that are no longer of use
* Added tests to EclipseGridTests that test boxed ACTNUM and activeCells
* Made EclipseGrid non-const in EclipseState since we must run resetACTNUM
* Fixed a minor typo in an error message in EclipseGrid
* Fixed typo in GridProperty: Deckeyword -> DeckKeyword
* Fixed two errors in tests recently introduced relating to Ecl3DProps
* Removed test in EclipseGridTests; We now accept too small ACTNUM vectors
* Added ACTNUM test for GridProperties
2016-04-19 10:54:09 +02:00
Liu Ming
940d7f8449 Merge remote-tracking branch 'remotes/opm/master' into MessageContainer-sub-class
Conflicts:
	opm/parser/eclipse/EclipseState/EclipseState.cpp
2016-04-15 09:14:00 +08:00
Jørgen Kvalsvik
a705b0750b Query all IDs of (FIP) regions in State
Enable support for querying what fluid-in-point regions are defined in
the deck. For now the only interesting regions are the ones specified by
the FIPNUM keyword in the REGIONS section.

The implementation is somewhat inefficient (n log n over the number of
cells in the grid), but since this is likely to only be called when
default-expanding SUMMARY section keywords this isn't too bad, since the
implementation is so dead simple.
2016-04-14 09:30:55 +02:00
Liu Ming
63e54c0157 use message container instead of OpmLog. 2016-04-14 11:03:53 +08:00
Pål Grønås Drange
7cffdb0ecf Renamed to get3DProperties() 2016-04-12 14:42:35 +02:00
Pål Grønås Drange
21f94c0606 TableManager and Deck are now used as references, hid GridProperties
* Added keyword "OPERNUM" to supported keywords in Eclipse3DProperties
* Updated tests to use Eclipse3DProperties API instead of GridProperties
* Moved init sequence of title into constructor
* ThresholdPressure and SimulationConfig now tasks Deck ref instead of shared_ptr
* Removed obsolete test and unused tests that tested gridProperties
* Refactor use of TableManager.  Is now a reference.
* Added non-const GridProperties.getKeyword(size_t i)
2016-04-12 14:42:34 +02:00
Pål Grønås Drange
3680dfcb97 Substantial edits to Eclipse3DProperties and ptr's
* moved region-property from EclipseState to Eclipse3DProperties
* moved initGridopts from EclipseState to Eclipse3DProperties
* made several Eclipse3DProperties methods private
* removed obsolete tests
* replaced log with throw internally in private method---is domain_error
* removed typedef in SatFuncPropertyInitializers
* postprocessors take raw pointers, not shared_ptr---these will be phased out
* fixed return reference instead of copy several places
** gridProperties<T> in Eclipse3DProperties are now references, not shared_ptr
** Eclipse3DProperties takes const Deck&, not shared_ptr
** EclipseGrid and Section are references
2016-04-12 14:42:34 +02:00
Pål Grønås Drange
e48b64c41d Substantial edits to Eclipse3DProperties
* Removed all references to state, need to fix initPORV
* Made TransMult return raw pointer const GridProperty over shared pointer.
* Moved getDirectionProperty and hasDirectionProperty out of API
** Removed tests as these methods are no longer public
* Moved grid properties stuff to new class
* Removed use of deck in SatfuncInitializers, moved to TableManager
* Removed shared_ptr for several members of EclipseState and 3DProperties
* Moved region-property from EclipseState to Eclipse3DProperties
* Moved initGridopts from EclipseState to Eclipse3DProperties
* Made several Eclipse3DProperties methods private
* Postprocessors take raw pointers, not shared_ptr---these will be phased out
* Fixed return reference instead of copy several places
** GridProperties<T> in Eclipse3DProperties are now references, not shared_ptr
** Eclipse3DProperties takes const Deck&, not shared_ptr
* Removed obsolete tests
2016-04-12 14:42:18 +02:00
Joakim Hove
0b316092c8 Added missing include. 2016-04-12 13:56:31 +02:00
Liu Ming
4eb2208e63 remove shared_ptr 2016-04-12 09:01:33 +08:00
Liu Ming
ed92c70efd Add MessageContainer to EclipseState. 2016-04-11 10:44:39 +08:00
Liu Ming
a4a449538d rename ParseMode as ParseContext in EclipseState folder. 2016-03-16 17:15:09 +08:00
Andreas Lauser
cfd38b8a66 EclipseState: rename the has*GridProperty() methods to hasDeck*GridProperty()
the intend is to better reflect that these properties where explicitly
created in the deck. The old method names can still be used, but they
will result in deprecation warnings.
2016-02-19 13:36:57 +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
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
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
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
debcf2ed80 New method EclipseState::applyModifierDeck() 2015-11-09 12:05:27 +01:00
Joakim Hove
f365dae56e Internalize ParseMode in EclipseState. 2015-09-23 10:36:10 +02:00
Joakim Hove
86b63013f3 Removed initSimpletables from EclipseState 2015-09-01 17:54:07 +02:00
Joakim Hove
cf5b4e36f8 Renamed file Tables -> TableManager 2015-09-01 17:54:06 +02:00
Joakim Hove
8bf744e590 Renamed class Tables -> TableManager 2015-09-01 17:54:05 +02:00
Joakim Hove
07e5fa04ce Moved PVTO and PVTG tables EclipseState -> Tables 2015-09-01 17:54:02 +02:00
Joakim Hove
0250a9408c Moved VFP Tables EclipseState -> Tables 2015-09-01 17:54:01 +02:00
Joakim Hove
9e79fa2e41 Moved xxxVD tables EclipseState -> Tables 2015-09-01 17:54:01 +02:00
Joakim Hove
688447bc0d Moved PLYSHLOG EclipseState -> Tables 2015-09-01 17:54:00 +02:00
Joakim Hove
9c8c38bd9e Moved RTEMPVD table EclipseState -> Tables 2015-09-01 17:53:59 +02:00
Joakim Hove
39ad0dcfe5 MOved GASVISC tables EclipseState -> Tables 2015-09-01 17:53:58 +02:00
Joakim Hove
a032ea925d Moved RockTables EclipseState -> Tables 2015-09-01 17:53:57 +02:00
Joakim Hove
91d5facc4b Moved simple polymer tables EclipseState -> Tables 2015-09-01 17:53:56 +02:00
Joakim Hove
9cb2440068 Moved OILVISCT and WATVISCT EclipseState -> Tables 2015-09-01 17:53:55 +02:00
Joakim Hove
6709a7a377 Moved PVDS EclipseState -> Tables 2015-09-01 17:53:54 +02:00
Joakim Hove
fc69fe6c80 Moved SGFN, SSFN and SWFN EclipseState -> Tables 2015-09-01 17:53:53 +02:00
Joakim Hove
d08d8799c7 Moved PVDO & PVDG EclipseState -> Tables 2015-09-01 17:53:52 +02:00
Joakim Hove
805b14de09 Moved SOF2 & SOF3 EclipseState -> Tables 2015-09-01 17:53:52 +02:00
Joakim Hove
05775392b9 Moved SLGOF EclipseState -> Tables 2015-09-01 17:53:50 +02:00
Joakim Hove
265219d322 Moved SGOF EclipseState -> Tables 2015-09-01 17:53:50 +02:00
Joakim Hove
bc852bc974 Moved SWOF EclipseState -> Tables 2015-09-01 17:53:48 +02:00
Joakim Hove
dd1f425d32 Moved tabdims instance EclipseState -> Tables 2015-09-01 17:53:47 +02:00
Andreas Lauser
dd99ac75a5 implement the table class for the SLGOF keyword
as far as I can see, this is the table which is required to support
all saturation functions.
2015-08-25 11:32:50 +02:00
Tor Harald Sandve
f59ca7f392 Support familyII in the SatfuncInitializer
- Moves saturation function family check from EclipseState to
SatfuncPropertyInitializers
- Add tests in SatfuncPropertyInitializersTests
- Fixes error in the SatfuncPropertyInitializers implementation for
familyII
2015-08-17 11:29:16 +02:00
Tor Harald Sandve
c081090a30 Add function for getting the saturation function family
If SWOF and SGOF (family1) are specified in the deck the function
returns 1
If SWFN, SGFN and SOF3 (family2) are specified in the deck the function
return 2
If keywords are missing or mixed, an error is given.
2015-08-17 11:29:15 +02:00
Tor Harald Sandve
b9f1dd4fc9 Add support for sat func family 2 keywords
Saturation functions input using SGFN and SOF3
2015-08-10 14:07:18 +02:00