Commit Graph

1290 Commits

Author SHA1 Message Date
Joakim Hove
14ba7e7e74 Merge pull request #310 from andlaus/improve_logging
Improve logging
2014-10-10 15:04:18 +02:00
Andreas Lauser
c41f5ac2ed ParserLog: print messages to a stream
If no ParserLog object is provided, stdout is used by default. The
stream can also be used to write to a logfile or it can be omitted
entirely. thanks to [at] joakim-hove for insisting on it...
2014-10-10 12:40:35 +02:00
Joakim Hove
e5fe0a9b9a New MULTREGT test based on copy FLUXNUM -> MULTNUM 2014-10-09 17:14:27 +02:00
Andreas Lauser
c73cb0b39a add most of the keywords required to parse decks used by the IRIS history matching codes
this basically comes down to adding a few flag keywords but also
requires to add a few E300 fields to TABDIMS...

the grid cannot be instantiated yet as these deck seem to use some
peculiar constructs to specify the grid data. In particular it uses
property modifiers for keywords that specify the grid. (which might be
not allowed by Eclipse but work anyway...) the deck contains something
like

```
GRID

EQUALS
DX  50.0 /
DY  50.0 /
DZ  50.0 /
/
```

which Opm::EclipseGrid can't handle yet because grid properties are only
evaluated after the grid has been instantiated...
2014-10-08 14:29:04 +02:00
Andreas Lauser
f51016db57 EclipseState: significantly extend usage of the new logging facility
in the process quite a few exceptions have been converted into log
messages.
2014-10-07 15:39:15 +02:00
Andreas Lauser
335a031185 add separate unit test for the Opm::checkDeck() function 2014-10-07 15:39:14 +02:00
Andreas Lauser
ff90fe71c0 replace the deck-internal logging system by ParserLog 2014-10-07 15:39:14 +02:00
Andreas Lauser
f600930a5f add a class for log messages of the parser
unsurprisingly, it's called ParserLog. For now, it is not used very
extensively, but it allows to demingle the log messages from the deck
objects. (i.e., it's possible to pass a const pointer to the deck
object to e.g. EclipseState and one will still get additional log
messages.)
2014-10-07 15:37:27 +02:00
Andreas Lauser
6736213bae Section::checkSectionTopology(): report more than the first error
i.e. don't return uppon encountering an error, just set a flag.
2014-10-07 14:22:56 +02:00
Andreas Lauser
76904f244f Opm::checkDeck(): complain about unrecognized keywords
"unrecognized" means "not created based on a ParserKeyword object"
2014-10-07 14:22:56 +02:00
Andreas Lauser
f76113f2b1 DeckKeyword: retain the ParserKeyword object
this is useful because DeckKeywords can have almost arbitrary names
(which match a regular expression) which makes it hard to retrieve
additional information about the keyword after it has been created...
2014-10-07 14:22:47 +02:00
Andreas Lauser
f651a8e9d8 add Opm::checkDeck()
this is analogous to Opm::Section::checkDeckTopology() but intended to be
more general. So far not too many tests are implemented...
2014-10-07 14:22:47 +02:00
Andreas Lauser
38797ea534 DeckKeyword: retain the location of keywords
this is useful for log messages.
2014-10-07 14:22:47 +02:00
Joakim Hove
4d88001b69 Merge pull request #309 from qilicun/plykw
update keyword PLYADS.
2014-09-28 11:59:17 +02:00
Liu Ming
daa6744116 update PLYADS "dimension". 2014-09-28 14:10:28 +08:00
Joakim Hove
e6733c7c8c Changed order of dimensions in PLYVISC 2014-09-28 07:54:15 +02:00
Liu Ming
f228554796 update keyword PLYADS. 2014-09-28 09:15:03 +08:00
Joakim Hove
5e6eb61023 Updated the PLYVISC keyword 2014-09-26 13:56:25 +02:00
Joakim Hove
70c94a36b2 Renamed GridProperty::size -> GridProperty::getCartesiansize 2014-09-26 09:57:33 +02:00
Joakim Hove
fa335b50fb Integrated the MULTREGT in the EclipseState/TransMult 2014-09-26 09:57:33 +02:00
Joakim Hove
9c43c63d9e Added class MULTREGTScanner
The class MULTREGTSCanner internalizes the content of one or several
MULTREGT keywords and can then scan through GridProperty region objects
to find region interfaces as specified in the MULTREGT keyword.
2014-09-26 09:53:25 +02:00
Joakim Hove
896a0b32fb Removed dummy -1 default values from MULTREGT 2014-09-26 09:53:24 +02:00
Joakim Hove
6a99d7c5ea Updated FaceDir functionality to support MULTREGT 2014-09-26 09:53:24 +02:00
Joakim Hove
95592ebbd7 Added MULTNUM keyword 2014-09-26 09:53:24 +02:00
Joakim Hove
f8cbb6592a Added getNXYZ() to the grid property. 2014-09-26 09:53:24 +02:00
Andreas Lauser
755b8f53cf check if the keyword item has sufficiently many data points before using defaultApplied()
this fixes the GridPropertyTests unit test. The morale of this is that
I should probably never trust my own stupidity...
2014-09-25 22:32:07 +02:00
Andreas Lauser
350c92375e add the PORV grid property and use NaNs as default values for most double grid property
when it comes to PORV, the final pore volumes of logically Cartesian
grids are hard to implement at this abstraction level because pore
volumes may be either specified using the PORO or by the PORV keywords
and both of them are grid properties. This means that to calculate the
pore volumes using the porosity, the porosity grid property must be
already finished when creating PORV. Because of potential interactions
between the PORV and PORO grid properties this is not possible to do
canonically at the grid property initializer stage...
2014-09-25 21:36:59 +02:00
Andreas Lauser
45619a93f2 GridPropertyInitializers: add unit test 2014-09-25 21:36:43 +02:00
Andreas Lauser
c5f602a17c grid properties: implement a table-lookup initializer for the endpoint scaling keywords 2014-09-25 21:36:42 +02:00
Andreas Lauser
f54de8eafb grid properties: introduce initializer objects
this makes it possible to define more complicated initializers for
grid properties. (needed for example for keywords like ISGU.) This
patch does not introduce them yet, but only adds the necessary
infrastructure.

notes:

 - to get around cyclic definitions in template classes, the
   EclipseState is changed to a (defaulted) template parameter which
   causes the compiler to only look up the class definition at
   instantiation time.
 - using std::shared_ptr in the property initializers would lead to
   cyclic references which would cause memory leaks. To avoid that,
   plain old references where used in most places. I think this is
   okay as the GridProperty objects should be considered internal to
   EclipseState and thus the EclipseState object should live at least
   as long as GridProperty objects...
2014-09-25 21:36:42 +02:00
Andreas Lauser
f8ec08e069 change the defaults for the *NUM integer properties to 1
and add the ENDNUM integer property.
2014-09-25 21:36:42 +02:00
Andreas Lauser
036db1da4a GridProperties: don't use the garbage from defaulted data items
e.g.

```
SWL
10*0.1 10* 10*0.2 /
```

resulted in the SWL keyword exhibiting undefined values for the middle
ten data points.
2014-09-25 21:36:42 +02:00
Andreas Lauser
68df912f7d data items: allow to set only a subset of the values
e.g. Eclipse specifies that for PERMX only the topmost layer needs to
be specified, i.e. the following is valid on a 3x3x3 grid

```
PERMX
9*10 /
```

the previous behaviour was to throw.

also, mark if data items have been defaulted, i.e., the item of

```
PERMX
* /
```

will now return true for 'defaultApplied()'.
2014-09-24 12:47:57 +02:00
Andreas Lauser
b4ff0efff8 EclipseState: export the IMPTVD and IMKRVD tables
and also fix a small build bug in these table classes. I don't know
why they have not been also fully dealt with in the recent table code
refactoring...
2014-09-24 12:47:57 +02:00
Xavier Raynaud
20c9a616e0 Use CMODE to set default control in WCONINJH. 2014-09-22 10:11:46 +02:00
Xavier Raynaud
4011cc96c6 Added test to check if default value is used. 2014-09-19 17:40:40 +02:00
Xavier Raynaud
9e61f55f6b Merge branch 'master' into wconinjh-support 2014-09-19 16:56:41 +02:00
Xavier Raynaud
48e687a8ea set controlMode to RATE for WCONINJH 2014-09-19 16:51:02 +02:00
Andreas Lauser
7ad309d3b3 move the table classes from .../Utility to .../EclipseState/Tables 2014-09-19 15:12:21 +02:00
Xavier Raynaud
fe15d4a1d2 Added support for wconinjh 2014-09-19 14:58:37 +02:00
Andreas Lauser
a057280492 tables: remove trailing underscores from the protected and private methods
opm-parser does not follow this convention...
2014-09-19 14:33:35 +02:00
Andreas Lauser
f6b2797e23 tables: make them instantiable exclusively by EclipseState
since tables can be tricky, we now enforce that the compiler bails out
if the user tries to instantiate a table class manually.

Note that a bit of trickery is needed to keep the low-level unit
tests working...
2014-09-19 14:33:35 +02:00
Andreas Lauser
aa0d7d2e6b EclipseState: initialize and expose the tables which are featured by the deck
since this code is becomming a bit tricky, it is now recommended to
use the tables of EclipseState instead of trying to initialize them
yourself...
2014-09-19 12:24:54 +02:00
Andreas Lauser
e994d7314e endpoint scaling tables: make the bare-metal getColumn(index) method public
it is _strongly_ encuraged to use the properly named methods to access
the respective columns, but opm-core's current endpoint scaling code
makes it hard to use these...
2014-09-19 12:24:54 +02:00
Andreas Lauser
59d35de3af add table classes for RSVD and RVVD
these keywords are used by opm-core, albeit currently in a
"bare-metal" way.
2014-09-19 12:24:54 +02:00
Andreas Lauser
f544c926df tables: propertly handle defaults and monotonicity of columns
for some kinds of tables this means linear interpolation for some
columns, constant for other columns and some tables do not allow to
specify default. Since there is no clear rule, this patch involved
checking the reference manual for every single f****** table keyword
plus some guess-work if the reference manual is unclear about
monotonicity and/or defaults.
2014-09-19 12:07:06 +02:00
Andreas Lauser
fd6209a34d make it possible to evaluate some tables using linear interpolation
... and constant interpolation at the fringes. this kind of evaluation
in between sampling point only makes sense for tables where the first
column is strictly monotonic, though.
2014-09-19 12:07:06 +02:00
Andreas Lauser
1bbe775831 make all table classes default constructible
this allows to store them in std::vectors, but requires to call the
init() method after construction...
2014-09-19 12:07:06 +02:00
Andreas Lauser
0055703aef remove PvcdoTable
because PVCDO is not a table keyword.
2014-09-19 12:07:06 +02:00
Andreas Lauser
0d423b83f4 remove the PvtwTable
because PVTW is not a table keyword...
2014-09-19 12:07:06 +02:00