Commit Graph

1273 Commits

Author SHA1 Message Date
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
Arne Morten Kvarving
51de1faa85 fixed: compile cjson object into libopm-json
i see no reason to keep the separate library and this circumvents
shared vs static linking issues.

an alternative fix is to fix the opm buildsystems to prioritize config
mode. that would be more involved.
2014-11-18 13:19:25 +01:00
Arne Morten Kvarving
870cf4514b added: cmake config mode and pkgconfig 2014-11-18 11:10:07 +01:00
Arne Morten Kvarving
303b9bc885 changed: cjson handling
- probe only for system lib (i.e. only probe in prefix paths)
old code ended up not installing the json lib due to finding a copy
in the build folder if a reconfiguration was performed.

- build internal copy static and bundle in libopm-json.so
no reason to install this as a shared library. if it is updated
originating from opm, the entire parser library is updated anyways.
2014-11-18 10:27:03 +01:00
Arne Morten Kvarving
a42b503bac fixed: properly encapsulate cjson 2014-11-18 10:27:03 +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
Joakim Hove
b2fbbfc8a7 Added small method to check if cell is active. 2014-11-16 20:07:03 +01:00
Joakim Hove
56b7f4e8c0 Removed emacs config 2014-11-16 19:08:10 +01:00
Andreas Lauser
f7fcd65f9f .dir-locals.el: remove Statoil developer setup specific commands
my emacs always asks me whether I want to apply these settings as it
consideres them unsafe. Furthermore, I use a different directory
structure, so these settings are useless to harmful for me.

If you want to keep these settings around, please move them to ~/.emacs
2014-11-11 12:11:54 +01:00
Joakim Hove
bae5a0cb46 Merge pull request #353 from joakim-hove/EclipsestateNoGrid
Eclipsestate no grid
2014-11-11 11:00:58 +01:00
Joakim Hove
456d36ccba Added test of EQUALS keyword auto creation. 2014-11-10 17:07:56 +01:00
Joakim Hove
ad75b870a5 Changes to emacs file . 2014-11-10 17:07:56 +01:00
Joakim Hove
5f7a7d8083 Removed EclipseState::hasGrid() method 2014-11-10 17:07:56 +01:00
Joakim Hove
cf5a839d97 Removed unnecessary default values. 2014-11-10 17:07:55 +01:00
Joakim Hove
ffce0408c4 Removed unused dummy grids in test deck. 2014-11-10 17:07:55 +01:00
Joakim Hove
52883c9e69 Check that exception is raised if PORV is initialized without grid. 2014-11-10 00:17:10 +01:00
Joakim Hove
24cb9944c6 EclipseGrid - check content of c_ptr before use
This commit contains quite large changes to the EclipseGrid. The main
functional change is that the access to the ecl_grid_type pointer is
protected. In addition there are 'white space' changes due to methods
moving around and some methods have been marked static.
2014-11-10 00:14:55 +01:00
Joakim Hove
6f4b353fe5 Using shared_ptr<EclipseGrid> instead of bare EclipseGrid * 2014-11-09 23:46:56 +01:00
Joakim Hove
39bca17ce0 Split EclipseGrid in dimensions and cell info.
In many cases the only required information in an EclipseGrid instance
is the cartesian dimensions. To facilitate simpler testing - and not
have to create a full dummy grid the dimensions have been internalized
as a separate nx,ny,nz triplet. With this commit it is possible to
instantiate a grid with only dimensions, and no underlying ecl_grid_type
pointer.
2014-11-09 23:31:53 +01:00
Andreas Lauser
a7ba8af558 EclipseState: make specifying anything which requires a grid an error if no grid could be instantiated 2014-11-09 17:37:32 +01:00
Andreas Lauser
4e293ee3e6 EclipseState: make it instantiable without a grid
instead of throwing, we now add a warning to the parser log...
2014-11-08 23:55:25 +01:00
Andreas Lauser
ead7e0a8c9 make the parser case-insensitive
i.e., make keywords ALL_UPPERCASE before using them because Eclipse
seems to be case-insensitive (although this is one of its undocumented
features...)
2014-11-07 14:24:12 +01:00
Andreas Lauser
fff0c9cdf0 Revert "also eat keywords containing lowercase letters"
this was inadvertedly merged. the real fix is to make the parser
case-insensitive...
2014-11-07 14:23:08 +01:00
Andreas Lauser
382d449ebb also eat keywords containing lowercase letters
The Norne deck actually exhibits this atrocity in form of the
'fluxnum' keyword in the file 'INCLUDE/PETRO/FLUXNUM_0704.prop'.

I don't know if Eclipse cares about the case of the keywords, but
opm-parser currently does for sure. (If Eclipse turns out to be
case-insensitive, the easiest fix for us is to just make all keywords
ALL_UPPERCASE...)
2014-11-07 12:58:04 +01:00
Andreas Lauser
e424017a31 grid property modifier keywords: make the box specifiers optional for all of them
this means adding defaults to EQUALS and COPY. While at it use -1 as
the default value for boxes in all of these keywords...
2014-11-07 12:02:05 +01:00
Andreas Lauser
af8cab1a64 ParserKeyword: fix typos and improve exception messages 2014-11-07 12:02:05 +01:00
Andreas Lauser
7955ea5dac ParserState: make it possible to detect if initialization went wrong
this is required to get meaningful error messages if the file
specified by INCLUDE does not exist.
2014-11-06 16:16:29 +01:00
Andreas Lauser
5bdb17f7c1 Parser: rename the internal parseStream() method to parseState()
there is still the public variant of Parser::parseStream() which
parses an arbitrary std::istream. the name of the state-taking variant
was just confusing, IMO...
2014-11-06 15:16:19 +01:00
Andreas Lauser
b2c17e5d1d ParserDoubleItem: Fix typos in exception message 2014-11-06 14:48:25 +01:00
Joakim Hove
4283097f13 Merge pull request #336 from osae/fix_smax
A few missing "SWMAX" ... (confer issue #334)
2014-11-06 09:29:51 +01:00
Joakim Hove
25c99f2335 Merge pull request #337 from andlaus/add_endpoint_specifiers
add a JSON definition for endpoint specifier keywords
2014-11-06 09:29:20 +01:00
Andreas Lauser
cfa57713b8 ParserLog: some minor additions
- the AllMessageTypes is not part of the MessageType enum anymore
- the getMessageType() now returns a MessageType enum instead of an integer.
- the clear() and append() methods have been added.
2014-11-05 14:04:04 +01:00
Andreas Lauser
46ff1a0f41 unknown keywords: use the line number of the raw keyword instead of the current one of the ParserState
in this context, the line number of the parser state object is the
location where the keyword is finished, while it is much more useful
to get the line where the keyword starts...
2014-11-05 13:13:50 +01:00
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