Commit Graph

252 Commits

Author SHA1 Message Date
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
25acd89325 rename the last files. 2016-03-17 08:42:46 +08:00
Liu Ming
a4a449538d rename ParseMode as ParseContext in EclipseState folder. 2016-03-16 17:15:09 +08:00
Atgeirr Flø Rasmussen
b026c55c3b Honor the ACTNUM keyword also for cartesian grids. 2016-03-01 14:40:36 +01: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
3e222f58d7 findVerticalPoints split up
Most users of the findVerticalPoints function didn't use more than one
of the vectors returned. By splitting them up into seperate functions,
we only have to compute what we'll use.
2016-03-01 08:46:23 +01:00
Jørgen Kvalsvik
7bf13fbb61 findCritical split up
Most users of the findCritical function didn't use more than one of the
vectors returned. By splitting them up into seperate functions, we only
have to compute what we'll use.
2016-03-01 08:46:23 +01:00
Jørgen Kvalsvik
9798b4667a findSaturationEndpoints split up
Most users of the findSaturationEndpoints function didn't use more than
one of the four vectors returned. By splitting them up into seperate
functions, we only have to compute what we'll use.
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
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
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
Joakim Hove
31c69e6702 Using unique_ptr in EclipseGrid. 2016-02-03 16:18:31 +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
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
a9477d057e Added function get cellDxDyDz 2016-01-08 15:36:59 +01:00
Joakim Hove
a85bac0034 Changes in const'ness 2015-12-21 15:30:14 +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
Atgeirr Flø Rasmussen
d87e20578c Change return type from tuple to array for getCellCenter(). 2015-11-24 14:25:37 +01:00
Joakim Hove
508e282d2f Added TransMult::applytMULTFLT( Fault ) overload. 2015-11-09 12:05:11 +01:00
Markus Blatt
d0b54e9f25 Fixes warning about ignored qualifiers on function return types.
In particular this warning is removed:
"In file included from /home/mblatt/src/dune/opm/opm-parser/opm/parser/eclipse/EclipseState/EclipseState.cpp:34:0:
/home/mblatt/src/dune/opm/opm-parser/opm/parser/eclipse/EclipseState/Grid/SatfuncPropertyInitializers.hpp:438:66: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
     const SaturationFunctionFamily getSaturationFunctionFamily() const{"
                                                                  ^
2015-10-22 16:09:41 +02:00
Liu Ming
eca2105f82 make the parameter as const. 2015-10-09 17:28:20 +08:00
Liu Ming
b0995cfc0b add PinchMode from string function. 2015-10-09 17:23:37 +08:00
Liu Ming
98f2659c84 add PinchMode to instead of string. 2015-10-09 16:28:53 +08:00
Liu Ming
7181255d6d Add support for PINCH item 4 and 5. 2015-10-09 10:29:33 +08:00
Joakim Hove
51e3aa82cc Update include path 2015-10-06 11:30:43 +02:00
Joakim Hove
7070517d1c Removed debug output. 2015-10-05 07:46:49 +02:00
Joakim Hove
4857f2299f Using TableContainer for RTEMPVD. 2015-10-03 17:32:12 +02:00
Joakim Hove
d9c5811e90 TableContainer: ENKRVD, ENPTVD, IMKRVD and IMPTVD. 2015-10-03 17:32:10 +02:00
Joakim Hove
9c9e9f48fd TableContainer for SGFN, SWFN and SSFN tables. 2015-10-03 17:32:09 +02:00
Joakim Hove
836ea66a49 TableContainer for SWOF,SGOF,SLGOF,SOF2 ans SOF3. 2015-10-03 17:32:08 +02:00
Atgeirr Flø Rasmussen
76e6972042 Silence various warnings. 2015-09-02 13:08:11 +02:00
Joakim Hove
cf5b4e36f8 Renamed file Tables -> TableManager 2015-09-01 17:54:06 +02:00
Joakim Hove
9e79fa2e41 Moved xxxVD tables EclipseState -> Tables 2015-09-01 17:54:01 +02:00
Joakim Hove
9c8c38bd9e Moved RTEMPVD table EclipseState -> Tables 2015-09-01 17:53:59 +02:00
Joakim Hove
fc69fe6c80 Moved SGFN, SSFN and SWFN EclipseState -> Tables 2015-09-01 17:53:53 +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