Commit Graph

79 Commits

Author SHA1 Message Date
Joakim Hove
f82a6fd281 Removed unused function tracking first RFT. 2017-09-28 08:38:55 +02:00
Joakim Hove
b6afb2ab8c Removed date accessor from IOconfig/RestartConfig. 2017-06-18 16:55:22 +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
6e64935d5c Implement restartfilename with ERT::EclFilename 2017-01-12 13:36:39 +01:00
Atgeirr Flø Rasmussen
489f9a658c Remove pessimizing move() in return statements. 2016-12-12 14:09:48 +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
6f35591fad Make IOConfig::getOutputEnabled const 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
7cff418ae5 Make RestartConfig no longer use shared_ptr 2016-10-19 20:38:27 +02:00
Jørgen Kvalsvik
53f178d7ce Make IOConfig no longer use shared_ptr 2016-10-19 20:38:27 +02:00
Jørgen Kvalsvik
4f0e6703f0 Remove DynamicState's reliance on TimeMap.
DynamicState assumes the time map is fully populated and stores only
its size (which is the only property it cares about).
2016-10-19 20:38:27 +02:00
Joakim Hove
c8d77dff99 Expand ALLPROPS in SOLUTION section RPTRST. 2016-09-06 00:25:07 +02:00
Joakim Hove
bcb4f51a4d Added some tests to verify ALLPROPS handling. 2016-09-05 13:11:41 +02:00
Joakim Hove
422ac7335b Special case 'ALLPROPS' mneomonic. 2016-08-22 17:08:16 +02:00
Joakim Hove
30a4974178 Added RestartConfig::getkeyword() to check mneonic 2016-08-22 16:45:28 +02:00
Joakim Hove
e093e470c8 Added RPTRST memonic without corresponding int. 2016-08-22 16:45:28 +02:00
Jørgen Kvalsvik
07b1706c58 Support for RPTRST/RPTSCHED options
A RestartConfig refurbishment that generalises some of the previously
special-casing. Short synopsis:

* Integer list input is first translated to their corresponding
  mnemonics.
* Mnemonic implementation support turning off input parameters via
  mnemonic=0, handled generally rather than special-cased for BASIC/FREQ
* Restart configuration setup is handled in one else-less, linear code
  path. RPTRST and RPTSCHED are interpreted by their separate helper
  functions, but they produce the same resulting object. Should be
  easier to follow
* Ignores unknown mnemonics, has a list of known/supported mnemonics
  that will be internalised.

The explicit list over supported keywords is from the Eclipse100 manual
and must be manually maintained, i.e. no dynamic solution is in place
yet. This might never be necessary, but support it dynamically isn't a
problem.
2016-08-11 09:59:54 +02:00
Jørgen Kvalsvik
295ef91063 Moved RestartConfig out of IOConfig
RestartConfig is a first-class citizen of EclipseConfig rather than
being embedded in IOConfig. This narrows IOConfig's responsibility to
only that of paths file system definitions and interactions, and
RestartConfig to what and when to output the restart file.
2016-08-11 09:59:54 +02:00
Joakim Hove
0e53246009 Internalize whih keywords to restart - in addition to when. 2016-08-10 16:33:25 +02:00
Joakim Hove
9bcdadd443 Merge pull request #890 from pgdr/transmult-and-shared_ptrs
Removing some use of shared_ptr
2016-08-09 09:32:41 +02:00
Pål Grønås Drange
41b158bb2b Shortified names, instead of state.getEclipseConfig().getSummaryConfig(), use state.cfg().summary() 2016-08-08 11:39:59 +02:00
Jørgen Kvalsvik
d7ac7ee9b8 Remove SCHEDULE as a special section
SCHEDULESection with its special implementation is a remnant of older
design and largely unnecessary now. The implementation also relied on
shared_ptr for efficiency and was not really used at all.

SCHEDULESection now is no longer special, and uses the same
implementation as SUMMARY, RUNSPEC etc. The one thing that separated it,
looking up keywords within a timestep, was only used once and this
computation has been inlined in the function.
2016-08-05 15:28:29 +02:00
Pål Grønås Drange
b359e9c0fb transmult is member, use ref's, use proper constructor of EclipseState 2016-08-05 15:07:15 +02:00
Atgeirr Flø Rasmussen
9b924b1fe1 Remove two unused functions. 2016-08-01 15:15:41 +02:00
Joakim Hove
0069b02e9f Extracted configuration of *when* to write restart
The configuration of when to write restart files is quite complex,
involving at least the three keywords RPTSOL, RPTRST and RPTSCHED. This
commit moves that configuration from the IOConfig class to the
RestartConfig class.

At a later stage the RestartConfgig class will be extended with
information of *what* to save in the restart file.
2016-07-15 15:26:51 +02:00
Joakim Hove
148b9b22ea Extracted configuration of *when* to write restart
The configuration of when to write restart files is quite complex,
involving at least the three keywords RPTSOL, RPTRST and RPTSCHED. This
commit moves that configuration from the IOConfig class to the
RestartConfig class.

At a later stage the RestartConfgig class will be extended with
information of *what* to save in the restart file.
2016-07-15 14:15:26 +02:00
Jørgen Kvalsvik
a33c6ad1a2 IOConfig::fullBasePath gives correct OS path
Leverages boost to properly convert path speficiations to the current
platform's preferred format.
2016-07-11 14:59:02 +02:00
Joakim Hove
896c8881fd Moved NOSIM handling to IOConfig + allow override. 2016-06-29 07:44:30 +02:00
Joakim Hove
337a141d28 Added IOConfig::getOutputBase() 2016-06-27 11:55:58 +02:00
Jørgen Kvalsvik
58d206f3b0 Comments in IOConfig. 2016-06-06 11:04:27 +02:00
Jørgen Kvalsvik
dcb291fa4d Remove magic numbers.
Prefer named indices in the integer lists when they are used in favour
of mnemonics.
2016-06-06 11:04:27 +02:00
Jørgen Kvalsvik
edb8cdc72d IOConfig creates TimeMap independently of Schedule
Completely remove the dependency between Schedule and IOConfig. IOConfig
will generate its own instance of TimeMap, rather than relying on
Schedule to construction and keeping it alive.
2016-06-06 09:04:30 +02:00
Jørgen Kvalsvik
4dfdf7ad7c IOConfig sets restart info, not Schedule
Break the cyclic dependency between IOConfig and Schedule where Schedule
updated parts of IOConfig. Instead, IOConfig completely builds its own
restart config.

Tests are updated to reflect this.
2016-06-06 09:04:30 +02:00
Jørgen Kvalsvik
469f33c575 Defaults for IOConfig; add string constructor
Brings back the Deck-less constructor for IOConfig, but leveraged by
default values for most members.
2016-06-06 09:04:30 +02:00
Jørgen Kvalsvik
f79f40802a IOConfig constructor accept Deck, use init list
IOConfig's string constructor has been deprecated in favour of accepting
a Deck. handleGridSection and handleRunspecSection been moved into the
constructor itself. This clarifies the *actual* dependency in expected
IOConfig usage.
2016-06-06 09:04:30 +02:00
Jørgen Kvalsvik
caa10631b0 IOConfig::handle* takes references over shared_ptr 2016-05-09 14:56:04 +02:00
Pål Grønås Drange
672b240e00 fixed bug in Parser, use openRootFile 2016-05-03 15:22:34 +02:00
Kjell W. Kongsvik
db7958d439 Return type -> const & 2016-05-02 10:13:28 +02:00
Kjell W. Kongsvik
34dbf826de Support explicit setting of BaseName
Needed when reading deck from string and trying to write to disk.
If this is not set there is no baseName to base the file name on.
2016-04-29 16:04:16 +02:00
Kjell W. Kongsvik
bedd431b10 Use path of input as default output path
Custom output path can be set explicitly using IOConfig::setOutputDir(path)
2016-04-29 11:24:48 +02:00
Kjell W. Kongsvik
65277fcc9f Removed getDeckFileName as the usage of it in EclipseWriter is not needed
Remove in opm-output
2016-04-28 16:19:56 +02:00
Kjell W. Kongsvik
79ab818c3a Default output dir is current active directory
Optionally specify using IOCondig::setOutputDir()
2016-04-28 13:45:09 +02:00
Kjell W. Kongsvik
5fb3a6fc53 Add dataFile to Deck if loaded from file
If loaded from string keep empty
2016-04-28 13:45:08 +02:00
Kjell W. Kongsvik
206e16fba5 Added fields to IOConfig so parameters can be removed from EclipseWriter
std::string     m_deck_filename;
bool            m_output_enabled;
std::string     m_output_dir;
2016-04-28 13:45:08 +02:00
Joakim Hove
b0a12b230e Internalize first output step for restart and RFT. 2016-03-28 18:47:30 +02:00
Liu Ming
a4a449538d rename ParseMode as ParseContext in EclipseState folder. 2016-03-16 17:15:09 +08: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
Jørgen Kvalsvik
4b98943665 Replaces unecessary header includes with fwd decls
Every header is self-contained and includes only what it must to
function, relying on users include what they need in source files,
adopting a pay-what-you-use model (in particular for internal
dependencies).
2016-01-26 13:23:22 +01:00
Jørgen Kvalsvik
f404828d63 Cleans up headers to improve build preformance
This is an effort to improve build performance.  Several includes
scattered across the project are either unused or partially used (i.e.
just used to import a type name, not depending on the actual contents of
the header file).

Replaces a lot of these includes with forward declarations.
2016-01-21 09:22:06 +01:00