Commit Graph

177 Commits

Author SHA1 Message Date
Joakim Hove
3c9f56a146 Initialize TEMPI property from RTEMP keyword. 2017-06-26 18:32:52 +02:00
Arne Morten Kvarving
18f15e7432 mark constructors as explicit 2017-06-09 17:38:42 +02:00
Jørgen Kvalsvik
e884b0664c Redesign cmake
Tune the makefile according to new principles, which adds a few bells
and whistles and for clarity.

Synopsis:

* The dependency on opm-common is completely gone. This is reflected in
  travis and appveyor as well. No non-kitware cmake modules are used.
* Directories are flattened, quite a bit - source code is located in the
  lib/ directory if it belongs to opm-parser, and external/ if third
  party.
* The sibling build feature is implemented through cmake's
  export(PACKAGE) rather than implicitly looking through source files.
* Targets explicitly set required public and private include
  directories, compile options and definitions, which cmake will handle
  and propagate
* opm-parser-config.cmake for downstream users is now provided.
* Dependencies are set up using targets. In the future, when cmake 3.x+
  can be used, these should be either targets from newer Find modules,
  or interface libraries.
* Fewer system specific assumptions are coded in, instead we assume
  cmake or users set up system specific details.
* All module wide configuration and looking up libraries is handled in
  the root makefile - all sub directories only set up libraries and
  compile options for the module in question.
* Targets are defined and links handled transitively because cmake now
  is told about them. ${module_LIBRARIES} variables are gone.

This is largely guided by the principles outlined in
https://rix0r.nl/blog/2015/08/13/cmake-guide/

Most source files are just moved - if they have some content change then
it's nothing more than include fixes or similar in order to make them
compile.
2017-06-01 15:29:23 +02:00
Joakim Hove
66efc1fd1f Small function which returns number of FIP regions 2017-05-24 21:05:42 +02:00
Andreas Lauser
1fa80328cf TableManager: export the Eqldims object
this object corresponds to the EQLDIMS keyword. Probably it is not the
most intuitive place to provide access to this keyword, but as far as
I can see the table manager is the only place where this object is
already properly instantiated.
2017-02-13 16:38:23 +01:00
jokva
35df865753 Merge pull request #1016 from jokva/pvcdo-viscref-watdent
Understand PVCDO, VISCREF, WATDENT
2017-01-03 11:51:38 +01:00
Jørgen Kvalsvik
45cfedb183 Understand PVDCO, VISCREF, WATDENT 2017-01-03 11:39:08 +01:00
Pål Grønås Drange
e5de0ca8d1 Revert throw, write warning to stderr
* no throw on JFUNC abuse, std::cerr
* removed 'get' from function names
2016-12-28 19:20:31 +01:00
Pål Grønås Drange
172725aef8 Added JFUNC in TableManager and getJFuncColumn()
* Fully internalized JFUNC
* Added JFunc.cpp, throw on wrong FLAG/DIR in JFUNC kw
* added tests for JFUNC in TableManagerTests
* added protected member m_jfunc to SimpleTable
* Added getJFuncColumn to accompany getPcowColumn
* Throws if pressure or jfunc is accessed inappropriately
 * ... meaning if getPcowColumn is called when JFUNC is in deck, or
 * getJFuncColumn is called when JFUNC is not in deck
* added tests for throwing and for getJFuncColumn
* SimpleTable.getColumn("PCOW/PCOG") throws if JFUNC
* In the event that one tries to get "PCOW" or "PCOG" via getColumn
* ... this will throw if JFUNC is present in the deck.
* Added tests.
2016-12-28 19:20:31 +01:00
Jørgen Kvalsvik
9a336f62fb Understand the ROCK keyword 2016-12-20 12:52:43 +01:00
Jørgen Kvalsvik
5413b841ef Generalise 'flat table'; implement DENSITY, PVTW
Several tables are identical both in structure *and* parsing, i.e. the
code required to parse them only differ in output type and possibly
number of items to read.

FlatTable is a simple vector-based template that expands into this exact
parsing routine, based on a simple specification of the record.
2016-12-20 12:52:43 +01:00
Jørgen Kvalsvik
1d535124ec TableManager.getPvtwTable
Provide a richer interface to the PVTW table.
2016-12-06 15:18:19 +01:00
Joakim Hove
5ebddba40e Changes in Tabdims construction:
1. Removed Tabdims(int,int,int, ....) constructor and added
    Tabdims(Deck) constructor.

 2. Added Tabdims member to Runspec( ) object.

 3. Changed std_shared_ptr<Tabdims> to Tabdims member in TableManager.
2016-11-18 10:48:02 +01:00
Joakim Hove
b13ec43635 Added inner table iterators to PvtxTable. 2016-11-16 19:53:54 +01:00
Pål Grønås Drange
d8400f05bd Minor fixes unrelated to PR:
* Implemented missing method "name" in TableColumn.cpp
* add inline to method in RestartConfig to remove warning
* Whitespace changes
2016-11-09 12:29:08 +01:00
Jørgen Kvalsvik
21aaceaed9 Runspec object; move phases from TableManager
There has never really been a natural home for initial properties that
aren't InitConfig, meaning information such as phases in the deck and
other runspec information hasn't had a natural home.

This patch introduces the Runspec object on EclipseState for phase
information and other similar properties that are interesting and static
for when setting up parameters etc. for simulation, that aren't all that
interesting once simulation starts.

An additional benefit is a leaner implementation for the phase enum and
some stricter semantics via enum classes.
2016-11-01 16:41:19 +01:00
Jørgen Kvalsvik
7652e0fcb5 TableColumn stores ColumnSchema, not pointer 2016-10-19 20:38:28 +02:00
Jørgen Kvalsvik
f2e509f59f UnitSystem named constructors with automatic storage 2016-10-19 20:38:28 +02:00
Jørgen Kvalsvik
f9cb516b99 Remove DeckPtr+ParserPtr aliases
Remove the deprecated DeckPtr and ParserPtr aliases and removes
shared_ptr<Deck> and friends from all interfaces.
2016-10-19 20:38:28 +02:00
Jørgen Kvalsvik
8645af71b8 Make PvtxTable no longer use shared_ptr 2016-10-19 20:38:28 +02:00
Jørgen Kvalsvik
56608e9a10 3DProperties default constructible
This also means UnitSystem must be default constructible, which now
makes the default unit system metric. GridProperties must also be
default constructible (a valid 0x0x0 grid with no properties).
2016-10-19 20:38:28 +02:00
Jørgen Kvalsvik
7a13488fb1 Make SimpleTable no longer use shared_ptr 2016-10-19 20:38:28 +02:00
Jørgen Kvalsvik
c893a92aa6 Make Dimension+UnitSystem no longer use shared_ptr 2016-10-19 20:38:27 +02:00
Jørgen Kvalsvik
5df5c769f6 Fix warnings in TableManagerTests 2016-07-13 23:40:09 +02:00
Jørgen Kvalsvik
036a4619e2 Fix warnings in TableContainerTests 2016-07-13 23:40:09 +02:00
Jørgen Kvalsvik
7bcd4a428d Fix warnings in Tables 2016-07-13 23:40:09 +02:00
Jørgen Kvalsvik
6226a154c7 Fix warnings in VFPProdTable 2016-07-13 23:40:09 +02:00
Jørgen Kvalsvik
ee121931b8 Fix warnings in ColumnSchema 2016-07-13 23:40:09 +02:00
Jørgen Kvalsvik
3696b750cd Remove opm-common dependency
Severs the code dependency on opm-commmon. There was no actual
functional dependency here, with the exception of some enable/disable
warning headers. To properly make opm-parser a stand-alone module the
usage of these headers have been removed and the dependency on
opm-common is gone.
2016-07-08 15:53:40 +02:00
Liu Ming
44fdf9b3c5 1. If the message is more than 1 line, add '\n' at the end of this message.
2. put file in front of line.
2016-06-13 13:40:57 +08:00
Liu Ming
d611c2deb6 remove unused variable. 2016-06-09 08:30:37 +02:00
Liu Ming
4b210aaa51 format the messages. 2016-06-08 15:38:21 +02:00
Liu Ming
6c7af4afc1 Make a clear message for VFP. 2016-06-08 13:45:40 +02:00
Liu Ming
8d59f6d3d8 remove unused method. 2016-06-06 13:48:47 +02:00
Liu Ming
9a23157b6a Write the VFR testing information into Debug file. 2016-06-06 12:26:26 +02:00
Magne Sjaastad
393bdb42f2 VS2015 : Added missing include to ssize_t 2016-05-25 10:39:19 +02:00
Liu Ming
17918ac5b3 use proper function to log filename, line number, msg. 2016-04-19 15:06:03 +08:00
Liu Ming
940d7f8449 Merge remote-tracking branch 'remotes/opm/master' into MessageContainer-sub-class
Conflicts:
	opm/parser/eclipse/EclipseState/EclipseState.cpp
2016-04-15 09:14:00 +08:00
Andreas Lauser
92a55cb267 avoid reserved names for guard macros
just like for macros that start and end with `__`, `clang++
-Weverything` likes to complain about macros which start and end with
a single underscore. This is basically the same issue as
Ensembles/ert#1048
2016-04-14 17:19:37 +02:00
Liu Ming
63e54c0157 use message container instead of OpmLog. 2016-04-14 11:03:53 +08:00
Liu Ming
f28dd65142 add MessageContainer object. 2016-04-14 09:39:28 +08:00
Atgeirr Flø Rasmussen
c74a441a3b Remove const with no effect on value return. 2016-04-13 12:56:05 +02:00
Pål Grønås Drange
3680dfcb97 Substantial edits to Eclipse3DProperties and ptr's
* moved region-property from EclipseState to Eclipse3DProperties
* moved initGridopts from EclipseState to Eclipse3DProperties
* made several Eclipse3DProperties methods private
* removed obsolete tests
* replaced log with throw internally in private method---is domain_error
* removed typedef in SatFuncPropertyInitializers
* postprocessors take raw pointers, not shared_ptr---these will be phased out
* fixed return reference instead of copy several places
** gridProperties<T> in Eclipse3DProperties are now references, not shared_ptr
** Eclipse3DProperties takes const Deck&, not shared_ptr
** EclipseGrid and Section are references
2016-04-12 14:42:34 +02:00
Pål Grønås Drange
e48b64c41d Substantial edits to Eclipse3DProperties
* Removed all references to state, need to fix initPORV
* Made TransMult return raw pointer const GridProperty over shared pointer.
* Moved getDirectionProperty and hasDirectionProperty out of API
** Removed tests as these methods are no longer public
* Moved grid properties stuff to new class
* Removed use of deck in SatfuncInitializers, moved to TableManager
* Removed shared_ptr for several members of EclipseState and 3DProperties
* Moved region-property from EclipseState to Eclipse3DProperties
* Moved initGridopts from EclipseState to Eclipse3DProperties
* Made several Eclipse3DProperties methods private
* Postprocessors take raw pointers, not shared_ptr---these will be phased out
* Fixed return reference instead of copy several places
** GridProperties<T> in Eclipse3DProperties are now references, not shared_ptr
** Eclipse3DProperties takes const Deck&, not shared_ptr
* Removed obsolete tests
2016-04-12 14:42:18 +02:00
Jørgen Kvalsvik
135f405e93 InitUnitSystem private; constness managed by .get
The const_cast in Deck::get*UnitSystem are potentially undefined
behaviour under a series of (plausible) conditions, and are deprecated
in favour of mutable members. Removes initUnitSystem from the public
interface, as the initialisation is handled on the first getUnitSystem
anyway, cleaning up the Deck interface slightly.

Adds proper constness to the use of unit systems that don't actually
modify the internal state in any way.
2016-04-06 15:09:32 +02:00
chflo
f2ed1ba7ea Moved OpmLog from opm-parser to opm-common 2016-03-21 22:07:49 +01:00
Liu Ming
a4a449538d rename ParseMode as ParseContext in EclipseState folder. 2016-03-16 17:15:09 +08:00
Joakim Hove
53471d2329 PLYVISC: INCREASING instead of STRIVLY_INCREASING. 2016-03-15 14:11:42 +01:00
Tor Harald Sandve
3991bf6e51 Add new keyword TLPMIXPA
The TLPMIXPA keyword can be used for giving pressure depended Todd-
Longstaff parameters. The implementation follows the description of
PMISC.
2016-03-08 15:14:21 +01:00
Jørgen Kvalsvik
f0ae5db131 opm-parser adoption of Deck automatic ownership
Since the Deck* family of classes have changed their interfaces to no
longer use shared_ptr, a lot of code broke. This patch fixes all
problems in tests, other signatures and accesses to now use the new Deck
interfaces.
2016-02-18 13:27:24 +01:00