Commit Graph

1112 Commits

Author SHA1 Message Date
Joakim Hove
06f2715d10 Added method GridProperties::getInitializedKeyword()
The getKeyword() method will autocreate and initialize a keyword if you
ask for one which is supported, but has not yet been accessed. The new
getInitializedkeyword() method will raise an exception if the keyword
has not already been initialized.
2014-12-18 18:02:10 +01:00
Joakim Hove
7588096c08 Added GridProperty::getDimensionString() 2014-12-18 18:02:09 +01:00
Joakim Hove
a100d94608 Added const to GridProperty::containsNan() 2014-12-18 18:02:09 +01:00
Joakim Hove
867fdb2de5 Added maskedSet() and initMask() GridProperties<T> 2014-12-18 18:02:08 +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
cf7e293635 make the build fail if a JSON keyword definition file could not be parsed 2014-12-15 17:19:32 +01:00
Andreas Lauser
b8a5280428 fix the unit for transmissibility when using the metric unit system
I don't know why exactly this happend, but anyway thanks to [at] bska
for catching it...
2014-12-12 12:21:38 +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
Joakim Hove
994932738d Merge pull request #339 from andlaus/low_level_improvments
Low level improvments
2014-12-11 11:49:32 +01:00
Andreas Lauser
d87a49a178 add grid properties for the TRAN[XYZ] keywords 2014-12-10 22:19:26 +01:00
Andreas Lauser
764dd03153 add a "Transmissibility" unit
this is required because Eclipse is inconsistent when specifying
transmissiblities: the only difference between transmissibilities in
metric and field units is that the pressures are in bars instead of
PSI, i.e. the numerator for metric units is still given in centi-Poise
times bbl. This makes it impossible to specify the transmissibilities
in terms of their constituting bits...
2014-12-10 16:58:37 +01:00
Joakim Hove
89f3a29e49 Merge pull request #344 from andlaus/more_useful_exception_messages
ParserKeyword: make the exception messages more verbose
2014-12-09 16:20:16 +01:00
Andreas Lauser
9510b976d5 ParserKeyword: make the exception messages more verbose
mostly, include the keyword names, so that the user can fix these
errors without using gdb. (Not that I mind gdb, but I have been told
that gdb is a big no-no. ;)

(this patch also fixes a few typos...)
2014-12-09 13:25:49 +01:00
Andreas Lauser
0cba93a283 address the review comment of #373 2014-12-09 12:41:04 +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
Andreas Lauser
1fdc60e73b Well(Injection|Production)Properties: adapt it to the naming and style conventions of the rest of the module
this patch only changes the conventions which are internal to the
code, i.e., users of these classes do not need to be adapted...
2014-12-09 12:05:27 +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
f4e4ab2796 Parser::parseState(): remove the 'verbose' debugging facility
This one could only be enable by modifying the source code. If such
debugging output is needed, it should be directly added via std::cout
and removed it before proposing the PR...
2014-12-09 11:55:03 +01:00
Andreas Lauser
755c3311f3 don't enter the parsing main loop if the leftover-from-last time keyword does not have any records 2014-12-09 11:54:55 +01:00
Andreas Lauser
017e582e5a handle comments and empty lines directly in the parser's main loop
note that comment handling is currently a bit too simplistic as stuff
like

FOO
'-- hello' /

won't work. as far as I can see, this is not different from the state
before this patch, though.
2014-12-09 11:54:55 +01:00
Joakim Hove
e03413f149 Merge pull request #378 from andlaus/remove_trailing_whitespace
remove all trailing white space
2014-12-08 19:54:53 +01:00
Andreas Lauser
b127b472ed clang 3.3: fix "unknown escape sequence" warnings 2014-12-08 18:28:19 +01:00
Andreas Lauser
aeb17403a7 GridPropertyInitializers: fix signedness comparison warning 2014-12-08 18:28:19 +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
f9b1fc56c8 Merge pull request #377 from joakim-hove/BUILD_TESTING
Build testing
2014-12-08 16:17:16 +01:00
Joakim Hove
ac299e62bc Removed unused Deck argument in method 2014-12-08 15:55:44 +01:00
Joakim Hove
ec6d22c9c2 Changed backtics to single ticks in string literal. 2014-12-08 15:55:20 +01:00
Joakim Hove
3604350847 Added if (BUILD_TESTING) ... around tests. 2014-12-08 15:54:34 +01:00
Joakim Hove
5ce2c11d94 Merge pull request #375 from dr-robertk/PR/add-keyword-SOF2-SWFN
Added keywords SOF2 and SWFN to allow for different saturation functions.
2014-12-08 15:46:18 +01:00
Robert K
01ddb76075 Added keywords SOF2 and SWFN to allow for different saturation functions. 2014-12-08 14:13:34 +01:00
Joakim Hove
bb9cf64776 Merge pull request #372 from chflo/OPM_139_write_ecl_restart_wellinfo
OPM-139: Added methods to Schedule
2014-12-08 09:59:45 +01:00
chflo
82243d0ec1 OPM-139: Added methods to Schedule to support opm-core in writing wellinfo to restart files 2014-12-05 12:59:53 +01:00
Joakim Hove
a2bc01ac64 Merge pull request #370 from andlaus/basic_temperature_support
Basic temperature support
2014-12-03 20:38:01 +01:00
Andreas Lauser
ad7f915a3e add a grid property for TEMPI
by default it is initialized using the temperature vs depth table...
2014-12-03 18:51:00 +01:00
Andreas Lauser
9ab4897587 add a table for RTEMPVD 2014-12-03 18:51:00 +01:00
Andreas Lauser
b1de0bf338 unit system: add temperature
this requires the possibility of specifying an offset for the SI
conversion because Eclipse in its eternal wisdom chooses to specify
temperatures using degrees Celsius and degrees Fahrenheit instead of
using Kelvin an Rankine...
2014-12-03 16:56:25 +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
Liu Ming
81be71cac8 throw if group polymer/salt concentration is set. 2014-11-20 17:23:12 +08:00
Liu Ming
94974f0454 add WPOLYMER to schedule section. 2014-11-20 16:20:54 +08:00
Joakim Hove
cc9fd8e3f7 Merge pull request #361 from flikka/keyword-folder
Put keywords in subfolders
2014-11-19 14:55:30 +01:00
Kristian Flikka
83a1016aaf Changed behaviour when same keyword occurs again, delete existing entry, replace with new. 2014-11-18 11:51:35 +01:00
Joakim Hove
84f49e6e92 Merge pull request #362 from akva2/fix_shared_libs
Fix shared libs
2014-11-17 16:28:38 +01:00
Arne Morten Kvarving
019f3e6672 changed: always build helper library static 2014-11-17 14:58:40 +01:00
Arne Morten Kvarving
85934aa769 fixed: add missing object in parserBuilder library 2014-11-17 14:58:33 +01: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