Commit Graph

178 Commits

Author SHA1 Message Date
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
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
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
Atgeirr Flø Rasmussen
8031ba9d56 Silence unused argument warning. 2016-03-29 21:22:08 +02:00
Joakim Hove
b0a12b230e Internalize first output step for restart and RFT. 2016-03-28 18:47:30 +02:00
chflo
f2ed1ba7ea Moved OpmLog from opm-parser to opm-common 2016-03-21 22:07:49 +01:00
Joakim Hove
a49f6ca00c Merge pull request #695 from jokva/refactor-grid-property-intializers
Refactor grid property intialisers
2016-03-21 21:33:39 +01:00
Liu Ming
a4a449538d rename ParseMode as ParseContext in EclipseState folder. 2016-03-16 17:15:09 +08:00
Jørgen Kvalsvik
ff1ad83f08 Split GridPropertyFunction into Init+Post
The assumptions and interface for these two functions are distinct. Init
does not have to take a preallocated vector, but post processing
requires an input vector. Splits the two and changes their signatures.
2016-03-01 08:46:23 +01:00
Jørgen Kvalsvik
24d4fe595e GridPropertyFunction interface improvements
Changes GridPropertyFunction's external interface to use references
rather than pointers. Means slightly less flexibility for tests, but
makes it clear what its dependencies are.
2016-03-01 08:46:23 +01:00
Jørgen Kvalsvik
34bfba42d3 Replace initializer classes, refactor PropertyInit
In an effort to make GridPropertyInitializer and
SatfuncPropertyInitializer functionality more maintainble, the
shared-ptr-to-base-class model has been replaced by a specialised
function object and free functions. This means:

* GridPropertyBaseInitializer and everything derived from it is gone
* All SatfuncPropertyInitializer code has been heavily rewritten to
  emphasise dependencies. Now behaves like proper functions.
* EclipseState intialisation code is somewhat simpler
* Code is more declarative. In particular, some maybe unintended
  behaviour has been discovered and described.
2016-03-01 08:46:23 +01:00
Jørgen Kvalsvik
80f3abe1c6 Move SatfuncInitializers to source file
Since the template-parameterised base header was moved to a source file,
there is no longer any reason for this to be header-only. Split into
source.
2016-03-01 08:46:23 +01:00
Jørgen Kvalsvik
7946f86f29 GridPropertyFunction interface in init/postprocess
The new GridPropertyFunction processes grid cell property vectors and
replaces GridPropertyBase* inheritance model. This implementation
re-uses the old implementations as a transition.
2016-03-01 08:46:23 +01:00
Jørgen Kvalsvik
357e1e0e53 Move GridProperty< T > to source file
GridProperty< T > has only two sensible types to parametrise, int and
double. Moves the implementation and instantiation of GridProperty to
GridProperty.cpp. This also applies to GridPropertyInitializers which
has also been moved to source files.

Results are a cleaner header file (for reading & understanding the
interface) and faster compilations.
2016-03-01 08:46:23 +01:00
Jørgen Kvalsvik
5b2ec6be75 GridProperties stores raw vector of keywords
Changes the type of the stored supported keywords from pointer-to-vector
to vector. This accomplishes the following:

* we avoid an unecessary level of indirection
* we enable initializer list syntax for tests etc.
* GridProperties' interface properly communicates that it takes over
  ownership of the passed keywords.
* it feels more natural in use as generating and returning a vector in a
  free function can be returned and directly passed to the constructor
  (the motivation for this change).

Bundled with this is the move of the supported keyword population into
using loops to exploit the similarities of families of keywords w.r.t.
GridProperties representation.
2016-03-01 08:46:22 +01: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
Tor Harald Sandve
710df504e2 Add support for MISCNUM
- MISCNUM is used to specify miscibility regions
2016-02-15 15:04:59 +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
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
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
bca167a53a Added THCONR as grid property 2015-09-11 14:03:30 +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