Commit Graph

245 Commits

Author SHA1 Message Date
Joakim Hove
eda7b60f54 Handle missing xxxDIMS keywords
For some keywords the number of records is given as the value of an item
in another keyword, for instance the number of records in the EQUIL
keyword is given by NTEQUL item in the EQLDIMS keyword.

If the EQLDIMS keyword is not given in the deck the Parser will consult
the default values of EQLDIMS keyword; i.e. a missing keyword is treated
as all-defaulted.
2015-02-06 13:04:17 +01:00
Atgeirr Flø Rasmussen
74d213ce18 Fix inconsistencies in test cases.
Not detected earlier since schedule did not access grid data.
2015-01-27 10:39:39 +01:00
Joakim Hove
d8f7c9660c Added simple algorithm to get ref depth from completions. 2015-01-26 12:26:24 +01:00
Joakim Hove
8d506b01a1 Added grid property to Well class 2015-01-26 12:21:51 +01:00
Joakim Hove
3cfe0291fd Added EclipseGrid as argument to Schedule constructor 2015-01-26 12:21:51 +01:00
chflo
a82509c676 OPM-145: Removed test ParseACTION 2015-01-14 10:11:50 +01:00
Joakim Hove
b12bcdb47b Added WellCompletion namespace for completion enums 2015-01-12 10:58:30 +01:00
Joakim Hove
b1a30272a2 Added hasValue() protection 2015-01-02 16:53:26 +01:00
Joakim Hove
cf97b3bbe6 Revert "Revert "make the parsing stage pass even if non-defaultable items have been defaulted""
This reverts commit 13d31809e8ca7b9f283bf29a0871110071263449.
2015-01-02 16:51:15 +01:00
Andreas Lauser
e0706524e0 Revert "make the parsing stage pass even if non-defaultable items have been defaulted"
This reverts commit 5ce5a3539641ac6eac9362d9c2b8a09084f9c35b.
2014-12-19 19:02:53 +01:00
Andreas Lauser
231cf39d47 make the parsing stage pass even if non-defaultable items have been defaulted
... but throw later when trying to access the data of the item in
question.

Note that this was demanded by [at] joakim-hove and that I do not want
to be held responsible for any issues which are caused by this
approach. (read: please direct your barks to Joakim if you fell on
your nose because of this...)
2014-12-18 11:43:52 +01:00
Andreas Lauser
0262b333fd make items which do not have a default un-defaultable
this was a much more common problem than it seemed initially...
2014-12-18 11:43:52 +01:00
Joakim Hove
1f111668ac Removed stale comments - problem has been fixed. 2014-12-15 17:36:11 +01:00
Joakim Hove
b585655a5c Changes in the log class:
1. Moved to from eclipse/Parser -> eclipse/Log
 2. Renamed ParserLog -> OpmLog
2014-12-15 17:36:10 +01:00
Andreas Lauser
c1988ad8a3 get rid of the 'strict parsing' concept
this is the 'Joakim-style' variant of the patch, i.e., an exception
will always be thrown if an unknown keyword is encountered.
2014-12-11 12:43:12 +01:00
Tor Harald Sandve
bb40baa96f Make MULTREGT work for NNC.
The region multipliers are no longer added  to the cartesian logical
MULT[XYZ] structure. Instead a new method
getRegionMultiplier(globalIndex1, globalIndex2,FaceDir) is added that
return the multiplier between globalIndex1 cell and globalIndex2 cell.
The face direction is added to support directional dependent MULTREGT
input. This implementation of MULTREGT also supports restricting the
multipliers to only apply for NNC or NONNNC.
2014-12-09 12:14:36 +01:00
Joakim Hove
b924f6cd02 DeckKeyword is immutable. 2014-12-09 11:56:05 +01:00
Joakim Hove
081b87b5b4 Removed m_deckIndex property from DeckKeyword 2014-12-09 11:56:05 +01:00
Andreas Lauser
ea38a25af4 remove all trailing white space
this is just the result of

```
find -iname "*.[ch]pp" | xargs sed -i "s/ *$//"
find opm/parser/share/keywords -type f |  xargs sed -i "s/ *$//"
```

so if it causes conflicts with other patches, the others should get
priority. The rationale behind this patch is that some people tell
their editor to remove white space which leads to larger than
necessary patches...
2014-12-08 16:34:28 +01:00
Joakim Hove
00dc724aba Merge pull request #368 from qilicun/wpolymer
add WPOLYMER to schedule section.
2014-12-02 12:21:40 +01:00
Liu Ming
5b3a92159a add unit test for WPOLYMER. 2014-11-21 13:21:24 +08:00
Kristian Flikka
71e8321d7c Created folders for keywords, these will be read in an alphanumerical sorted order. To enable organization and override of keywords. 2014-11-17 13:37:00 +01:00
Joakim Hove
456d36ccba Added test of EQUALS keyword auto creation. 2014-11-10 17:07:56 +01:00
Andreas Lauser
fbf6008da4 Parser: rename and split canParseKeyword to isRecognizedKeyword
which is more what the method does because the keyword can still
contain an error in its data which would make it non-parseable.

While at it, split the method into a "get keyword name from input
line" and "is a valid keyword name" part. (this will be needed later.)
2014-11-05 13:08:04 +01:00
Joakim Hove
dc035c3c58 Merge pull request #314 from joakim-hove/PORV
Porv
2014-10-20 09:58:25 +02:00
Joakim Hove
322dbb67e4 Merge pull request #326 from joakim-hove/wellsmanager-crash
Wellsmanager crash
2014-10-17 08:06:14 +02:00
Joakim Hove
a50e66b8a9 Added BoxTest which will throw for oversized keyword 2014-10-15 13:26:14 +02:00
Joakim Hove
72cc1630f0 Added extra test case for closing wells. 2014-10-14 16:59:35 +02:00
Joakim Hove
a43d8e447c Fixed initialisation of well properties
Previously the control mode was initialized to ORAT; this was later set
to the correct value when parsing the relevant keywords - but in the
case of a SHUT well the control mode was not updated, and we were left
with a well under ORAT control.
2014-10-13 19:26:53 +02:00
Andreas Lauser
ee9b7d2cae Extend deck grooming functions to detect keywords which are in invalid sections 2014-10-13 16:06:09 +02:00
Joakim Hove
e0cf8cebde Added postprocessor properties to scatter from top.
For the petrophysical properties PERM? and PORO only the top layer must
be specified, cells further down can be copied from the layer
above. This functionality is implemented with a GridProperty
postprocessor.
2014-10-10 15:48:57 +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
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
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
Andreas Lauser
7ad309d3b3 move the table classes from .../Utility to .../EclipseState/Tables 2014-09-19 15:12:21 +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
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
6dbe6ae5ac remove the "value status" concept from deck items
I know it was only added recently, but all of the "setInDeck()" calls
can now be substituted by a combination of item->size() and
item->defaultApplied(index)...
2014-09-15 12:17:04 +02:00
Andreas Lauser
16337759b6 add some defaulted values to the unit test of PVTG 2014-09-15 12:17:03 +02:00
Andreas Lauser
b72df6f406 make ParserItems always defaultable
i.e. remove the defaultSet() method and its friends. this is required
to be able to specify defaults in DATA items like grid properties or
saturation tables. e.g.

SGL
10*0.1 10* 10*0.2 /

would not be possible without this. If no meaningful default for an
item is defined, float and double items get NaN, int items get -1 and
string ones get an empty string. The hope is that if these values get
used in the simulation, they will make the result obviously
incorrect. (Whether a data point of an item was defaulted can be
queried using item->defaultApplied(index).)
2014-09-15 12:17:03 +02:00
Andreas Lauser
539c7a23ae make the defaults of an item settable per data point
instead of for the whole item...
2014-09-15 12:17:03 +02:00
Andreas Lauser
e6fa1e01a8 DeckItem: add indices to the methods which allow to query the defaulted status
also, this renames DeckItem::setInDeck() to DeckItem::wasSetInDeck()
because the former method can easily be confused with a setter method
(which it is not, it is a 'getter').

note that there is a small semantical difference now: the old
signatures specified the status of the whole *item* while the new
variants are specific for a single *data point* of an item. Though at
this point the index passed to the methods is still disregarded..
2014-09-15 12:17:03 +02:00
Andreas Lauser
66139d9f07 fix compiler warnings and rename CF to ConnectionTransmissibilityFactor
for the compiler warnings, see e.g.

https://opm-project.org/CDash/viewBuildError.php?type=1&buildid=27777

the CF to ConnectionTransmissibilityFactor rename makes things much easier to
understand for people who are not intimately familiar with the wells
code.
2014-09-06 22:18:55 +02:00
Joakim Hove
be32f91004 Changed Completion to use Value<double>. 2014-09-04 22:10:16 +02:00