Commit Graph

161 Commits

Author SHA1 Message Date
Joakim Hove
55f482b202 Add ParseContext argument to SummaryConfig. 2016-07-01 13:59:18 +02:00
Joakim Hove
e40e731b2c Merge pull request #51 from joakim-hove/rename-writeInit
Rename write init
2016-07-01 13:56:47 +02:00
Joakim Hove
a40dc3c1c1 Fixed bug with global/active mapping for output. 2016-07-01 13:03:51 +02:00
Jørgen Kvalsvik
0c0a548219 New private Summary implementation
A rewritten Summary.cpp with some minor header modifications. Synposis
of the new implementation:

* Uses unordered_map< string, std::function > for dispatch, instead of
  multiple functions and a switch
* Some poor man's function composition support has been added
  (privately) to avoid a lot of reptition in the post processing.
* Functions assume they work over lists of wells instead of single wells
  being special cased - this means groups of well etc. can share
  implementation with single wells and field keywords.
* Unsupported keywords are not written in the Summary file.

Furthermore, some comments on special cases and overall approach and
a generally more declarative implementation. This change is invisible to
downstream developers. Users will obviously see no more garbage
keywords.
2016-06-30 09:54:40 +02:00
Joakim Hove
2333191908 Unrelated: Using C++ TestArea. 2016-06-29 13:10:35 +02:00
Joakim Hove
031306735a Unrelated: using EclipseGrid.getCartesianSize() 2016-06-29 13:10:35 +02:00
Joakim Hove
c0b56afb13 Removed NNC argument to EclipseWriter constructor. 2016-06-29 13:10:35 +02:00
Joakim Hove
4b11d9a059 Rename wrietInit -> writeInitAndEgrid() 2016-06-29 13:10:35 +02:00
Joakim Hove
12e36f6cff Moved NNC argument to writeInit() method. 2016-06-29 13:10:35 +02:00
Joakim Hove
28add15c71 Filename overload without report step argument. 2016-06-29 13:10:35 +02:00
Joakim Hove
6a1888af14 Refactored writeInit:
- Removed class Init completely - writeint an init file is handled by
   the method EclipseWriter::writeINITFile( )

 - Seperated writing of INIT file and EGRID file better.
2016-06-29 13:10:35 +02:00
Joakim Hove
7a64bf579e Renamed Filename::ertHandle() -> Filename::get() 2016-06-29 13:10:35 +02:00
Joakim Hove
b232c568af writeInit() - can optionally take properties. 2016-06-29 13:10:35 +02:00
Joakim Hove
9b1d0d3cee Added small struct data::CellData. 2016-06-29 13:10:35 +02:00
Joakim Hove
978bd9e857 Some reformatting. 2016-06-29 13:10:35 +02:00
Joakim Hove
3d460f16a5 Moved 'INIT' keyword in testdata. 2016-06-29 13:10:35 +02:00
Joakim Hove
791da336fe Removed unchecked calls to writeInit(). 2016-06-29 13:10:35 +02:00
Joakim Hove
66103cd2a0 Respect outputdir: using IOConfig::getOutputBase() 2016-06-27 11:57:49 +02:00
Joakim Hove
0f238d6552 Explicitly created output in subdirectory. 2016-06-24 19:39:46 +02:00
Joakim Hove
299b453b56 Using ERT::TestArea. 2016-06-24 19:39:17 +02:00
Pål Grønås Drange
e7461ccfea Added DX/DY/DZ to summary_deck.DATA 2016-06-21 16:03:23 +02:00
Joakim Hove
b1920ef251 Merge pull request #43 from jokva/well-shared_ptr-deprecated
Well shared_ptr alias deprecated
2016-06-20 14:56:53 +02:00
Jørgen Kvalsvik
7c82e69a00 Copy and save a Grid copy in Writer; apply actnum
Simulators might modify the grid post EclipseState creation, so the Grid
fetched from there is unreliable. Copy the Deck-provided grid and apply
the manipulations at EclipseWriter construction time to ensure it uses
the same dimensions and has the same properties as the simulator.
2016-06-16 14:30:27 +02:00
Jørgen Kvalsvik
04ea6c90a8 Well shared_ptr alias deprecated
The shared_ptr aliasing is deprecated, and in the Well case this has
been removed upstream.
2016-06-16 10:12:39 +02:00
Atgeirr Flø Rasmussen
6f531033be Use namespace rather than member syntax. 2016-06-15 09:42:02 +02:00
Atgeirr Flø Rasmussen
8c538ce60e Avoid shadowing. 2016-06-15 09:41:43 +02:00
Atgeirr Flø Rasmussen
61bc977d27 Suppress boost warnings. 2016-06-15 09:40:18 +02:00
Jørgen Kvalsvik
e0721786c4 Replace boost-filesystem with ert
Ert is a hard dependency that provides much of the core functionality of
opm-output, whereas boost::filesystem only provided create-directory
features. Since Ert conveniently provides the same features with a
near-identical interface and is used for file-writing anyway, the
responsibility for interacting with the file system has been put on ert.

Boost is now only used for testing in opm-output.
2016-06-13 14:46:20 +02:00
Joakim Hove
c45fcc5e50 Merge pull request #37 from joakim-hove/travis-reorg
Using travis build-all configuration.
2016-06-11 07:28:01 +02:00
Jørgen Kvalsvik
64ea598240 Remove unused message 2016-06-10 14:00:18 +02:00
Joakim Hove
7b4ed3cd63 Using travis build-all configuration. 2016-06-10 13:46:59 +02:00
Jørgen Kvalsvik
d65cf1d657 Only write positive values to Summary file
Since production is seen as negative injection, and production rates
often are zero, negative zeros would be returned. Likewise, occasionally
numerical noise gives slightly-below-zero values which are now rounded
to be plain zeros.
2016-06-10 10:04:00 +02:00
Jørgen Kvalsvik
87e24b91b6 Look up history rates at correct timestep
The input format and parser interacts non-intuitively, as the observed
rates for timestep N are written for timestep N-1.
2016-06-10 10:03:49 +02:00
Jørgen Kvalsvik
ac0ed1447c Don't crash when a Well is not in data::Wells
It's perfectly legitimate for clients to "default" a well result, e.g.
when it hasn't started up yet, in which case most output will default to
0. Avoid crashing when this happens, and instead calculate based on a
dummy well.
2016-06-07 08:42:30 +02:00
Jørgen Kvalsvik
c87ffb1608 Base Summary test durations on days
Basing the dest durations on days over seconds make them less noisy,
more readable and closer to actual idiomatic use. Removes some subtle
complexities from the tests.
2016-06-07 08:42:30 +02:00
Jørgen Kvalsvik
c5397488a8 Correctly calculate totals 2016-06-07 08:42:30 +02:00
Jørgen Kvalsvik
54fdaadff9 Use basename for filename, not title 2016-06-07 08:41:39 +02:00
Jørgen Kvalsvik
bb53a74763 Use alias for UnitSystem::measure 2016-06-07 08:41:38 +02:00
Jørgen Kvalsvik
c1ea13a550 Use grid-provided index calculations. 2016-06-07 08:40:41 +02:00
Jørgen Kvalsvik
800b214462 Relace ad-hoc keyword-struct with EclKW_ref 2016-06-07 08:40:41 +02:00
Jørgen Kvalsvik
b238762731 Replace ert_unique_ptr with FortIO 2016-06-07 08:40:41 +02:00
Jørgen Kvalsvik
e73475db80 Renaming: 'handle' names made more descriptive 2016-06-07 08:40:41 +02:00
Jørgen Kvalsvik
9e39b92c99 Keyword replaced with ERT::EclKW
Use library-provided ecl_kw abstraction rather than rolling our own RAII
wrapper.
2016-06-07 08:40:41 +02:00
Jørgen Kvalsvik
0f1a1d7ede NNC variable not defaulted in writeInit 2016-06-07 08:40:41 +02:00
Jørgen Kvalsvik
99e2a55204 Replace raw conversion_table with UnitSystem
The to_si/from_si functions were moved into UnitSystem which now manages
table lookup for clients, rather than having to store the raw
conversion tables.
2016-06-07 08:40:41 +02:00
Jørgen Kvalsvik
bed743c763 Travis: don't build material and core 2016-06-07 08:40:41 +02:00
Jørgen Kvalsvik
e2a5c01a8b Read sim start time from EclipseState
Reading the start time from EclipseState means it's no longer required
as a parameter to every method, and that the current time can be
calculated as start time + time elapsed.
2016-06-07 08:40:41 +02:00
Jørgen Kvalsvik
91d5cad61e Remove unused argument from writeInit 2016-06-07 08:40:41 +02:00
Jørgen Kvalsvik
ecbbec3aad Remove the OutputWriter-Eclipse inheritance
This is-a relationship is never used, and the vtable is never leveraged.
The augmented output writers already use uniquely named output writers
anyway, so there is no reason to go via the hurdle of inheritance.

This gives a lot of flexibility when it comes to interface, since
Eclipse output can make Eclipse-specific assumptions.
2016-06-07 08:40:40 +02:00
Jørgen Kvalsvik
6efe691629 Replace boost::posix_time with time_t
The boost object was only used to calculate elapsed posix time anyway,
which is required (and already managed) by the callers. This makes the
interface slightly less complicated and removes an otherwise pointless
dependency.
2016-06-07 08:40:40 +02:00