Commit Graph

1286 Commits

Author SHA1 Message Date
Andreas Lauser
f8946b9e7e RawKeyword: rename tryParseKeyword() to isKeywordPrefix()
because the method never tried to *parse* the data as a keyword but always
returned whether the *calling* code should try to parse it...
2014-11-05 13:11:52 +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
Andreas Lauser
6eb3421f38 Handle quotes better
This allows to arbitrary characters like stars into strings. e.g.

MYKEYWORD
'123*456' 2*'Hello, World! (*)' /

is now a valid record with three strings while it threw an exception
before.

This patch works by transferring the removal of the quotes from the
RawDeck class to the readValueToken<T>() function which now has a
specialization for strings that deals with quotes. One small
complication is that the RawDeck needs to be adapted in order not to
split tokens in the middle of strings.

Finally, the StarToken class does not deal with the conversion from
string to the value type of the item anymore which allows it to become
a normal class instead of a template...
2014-11-05 13:05:22 +01:00
Andreas Lauser
d3188b6e8b add a JSON definition for endpoint specifier keywords 2014-10-30 20:52:25 +01:00
osae
954decba24 A few missing "SWMAX" ... (confer issue #334) 2014-10-30 18:49:34 +01:00
Joakim Hove
879f30e3ff Merge pull request #331 from andlaus/fix_PORV_tests_v2
Fix PORV tests v2
2014-10-21 14:44:16 +02:00
Andreas Lauser
3d2a6354a4 fix the "only <double> can be queried for NaN" exceptions
seems like some compilers don't overwrite an inline method of a
template class with its specialization. A compiler warning would have
been nice to have in this case, though...
2014-10-21 13:40:49 +02:00
Andreas Lauser
5b5a3337b0 EclipseState: don't use static vectors to specify supported grid properties
this fixes a really ugly and hard to find bug if EclipseState was
instanced multiple times: The EclipseState object passed to some of
these structures was destroyed, but the arrays stayed even if the next
EclipseState object was at a different location and also could use a
completely different grid...
2014-10-21 13:03:09 +02:00
Andreas Lauser
fa845b287e make the PORV test work more reliably
this seems to be a compiler bug, but it could be something
else. Anyway, using multiple functions for the tests instead of nested
scopes is probably not the worst idea anyway...
2014-10-21 11:48:51 +02:00
Joakim Hove
1cb4c1c082 Added missing sections: attribute 2014-10-20 10:36:45 +02: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
16ba570103 Merge pull request #296 from andlaus/add_section_awareness
Add section awareness
2014-10-15 18:44:35 +02:00
Joakim Hove
a50e66b8a9 Added BoxTest which will throw for oversized keyword 2014-10-15 13:26:14 +02:00
Joakim Hove
c637463327 Added functionality to calculate PORV property. 2014-10-15 13:26:14 +02:00
Joakim Hove
95c4d41a30 Merge pull request #322 from andlaus/non-strictly_monotonic_in_plyads
PlyadsTable: do not require the second column to be strictly monotonic
2014-10-14 22:14:19 +02:00
Joakim Hove
72cc1630f0 Added extra test case for closing wells. 2014-10-14 16:59:35 +02:00
Joakim Hove
3a48ace17f Fixed log message 2014-10-14 16:10:44 +02:00
Andreas Lauser
29cad4d51b add the ALL keyword
The documentation of this keyword is quite well hidden in the "Other
SUMMARY keywords" section of the Eclipse reference manual, but the
keyword itself seems to be widely used...
2014-10-14 12:07:14 +02:00
Andreas Lauser
6b6a5bf69e change the name for the generated keyword tests to make them unambigous
the problem was the ALL keyword which caused a naming conflict with
Opm::ParserItemSizeEnum::ALL. I haven't considered the possibility to
break the build by adding a keyword, so sorry for the breakage.

On a more philosophical ground I think it is a bit questionable to
auto-generate test cases at build time because they will automatically
match the keyword definition, whether this definition makes sense or
not...
2014-10-14 12:03:58 +02:00
Joakim Hove
21acc50115 Revert "add the ALL keyword" 2014-10-14 08:39:00 +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
Joakim Hove
ed1b1072c3 Added CMODE_UNDEFINED enum values 2014-10-13 19:24:55 +02:00
Joakim Hove
94a7a498b3 Moved WellInjectionproperties to separate files. 2014-10-13 19:24:02 +02:00
Andreas Lauser
85485db2a2 remove the TlmixparTable class
that's because the TLMIXPAR keyword is not a table...
2014-10-13 18:44:22 +02:00
Andreas Lauser
3b86bfd474 remove dangling file opm/parser/eclipse/Utility/tests/TableTests.cpp
somehow this fell through the cracks when doing the big tables overhaul.
2014-10-13 18:41:52 +02:00
Andreas Lauser
124aa75df8 PlyadsTable: add a unit test and fix a copy-and-paste bug unearthed by it 2014-10-13 18:40:42 +02:00
Andreas Lauser
0fd43afede add the ALL keyword
This keyword is undocumented but seems to be widely used. (It is even
featured by an example in the Reference Manual.)
2014-10-13 17:38:45 +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
Andreas Lauser
a4f55f5f8d JSON keyword definitions: make the "sections" item mandatory
the empty list can be used which means that the keyword may occur in
any section. (which is useful for e.g. section delimiters.)
2014-10-13 16:06:09 +02:00
Andreas Lauser
d94097617b ParserKeyword: add the glue code so that it knows its sections 2014-10-13 16:05:59 +02:00
Andreas Lauser
28fa0fa3b4 JSON keyword definitions: add a "sections" item
this which specifies the allowed sections of the keyword. (surprise!)
2014-10-13 16:05:59 +02:00
Andreas Lauser
8d56ef5179 PlyadsTable: do not require the second column to be strictly monotonic
monotonic is sufficient. thanks to [at] qilicun for the catch!
2014-10-13 12:22:09 +02:00
Joakim Hove
da5fd34262 Merge pull request #319 from qilicun/add_wpolymer
Let parser recongnize keyword WPOLYMER.
2014-10-13 08:39:59 +02:00
Liu Ming
697f2245f7 Let parser recongnize keyword WPOLYMER. 2014-10-13 10:56:30 +08:00
Liu Ming
209ecbeb21 size of PLYMAX should be determined by NPLMIX in REGDIMS not MISCIBLE. 2014-10-13 09:52:12 +08:00
Joakim Hove
685bd7171a Merge pull request #317 from qilicun/kw_polymer
add kyeword polymer.
2014-10-11 14:16:12 +02:00
Liu Ming
173661f14b add kyeword polymer. 2014-10-11 11:31:42 +08: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
Joakim Hove
1df2e656a9 Added post processor to GridProperty 2014-10-10 15:48:01 +02:00
Joakim Hove
f8abfe6333 Added keyword MULTPV 2014-10-10 15:48:01 +02:00
Joakim Hove
e8c5176f1b Added containsNaN() method to GridProperty 2014-10-10 15:48:01 +02:00
Joakim Hove
b26475031c Added GridProperty::multiplyWith( ) 2014-10-10 15:48:00 +02:00
Joakim Hove
88d9319197 Added iset() method to GridProperty 2014-10-10 15:48:00 +02:00
Joakim Hove
dc3f37dd27 Added LogParser argument. 2014-10-10 15:24:58 +02:00
Joakim Hove
82e8d1a56b Added static_cast<long long> before calling std::to_string() 2014-10-10 15:24:26 +02:00
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