Commit Graph

62 Commits

Author SHA1 Message Date
Joakim Hove
e40e731b2c Merge pull request #51 from joakim-hove/rename-writeInit
Rename write init
2016-07-01 13:56:47 +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
b232c568af writeInit() - can optionally take properties. 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
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
61bc977d27 Suppress boost warnings. 2016-06-15 09:40:18 +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
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
0f1a1d7ede NNC variable not defaulted in writeInit 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
c1775bc1f1 Implement EclipseWriter as private; hide RFT
Hides all the EclipseWriter details and helper classes using pimpl,
which now enforces the non-copyability of EclipseWriter (which relies on
open and stateful file handles).
2016-06-07 08:40:40 +02:00
Jørgen Kvalsvik
6f90959d42 Remove opm-core dependency in writenumwells test 2016-06-07 08:40:40 +02:00
Jørgen Kvalsvik
0e9238a175 Remove opm-core dependency in Restart test; rename
Removes the opm-core dependency in the restart test, and renames the
file to be more in style with the new test set.
2016-06-07 08:40:40 +02:00
Jørgen Kvalsvik
038007b431 Remove opm-core dependency in EclipseWriter test 2016-06-07 08:40:39 +02:00
Jørgen Kvalsvik
d1c0575f47 Remove opm-core dependency in RFT test; rename
Rewrites the RFT test to be independent of opm-core data types and
functions, and renames it to test_RFT since the class now represents the
full file, not some open-closing handle.
2016-06-07 08:40:39 +02:00
Jørgen Kvalsvik
530407a3ad EclipseWriter header cleanup
Remove the unnecessary or unused includes. Consequence is well enum
conversions being no longer public static. To not break the tests the
functions have been implemented in writenumwells.
2016-06-07 08:40:39 +02:00
Jørgen Kvalsvik
5af3fb84fe Refactor RTFWriter
Remove the opm-core dependency and re-implement the RFT writer. The
approach has been changed in the sense that we now store and keep alive
a file instance for the RFT file, instead of re-opening the file at
every time step.
2016-06-07 08:40:38 +02:00
Jørgen Kvalsvik
99e8eefd21 More intuitive order of rates in data::Wells 2016-06-07 08:40:38 +02:00
Jørgen Kvalsvik
887491e851 Summary takes secs_elapsed, not per-step duration
To stay consistent with the interface exposed by the other
eclipse-writer components, the summary facilities takes its time elapsed
since simulation start, not on a per-step basis.
2016-06-07 08:40:38 +02:00
Jørgen Kvalsvik
6c8e3434d2 Rewrite support for reading restart files
The support for reading restart files has been written in order to break
the dependency on opm-core. init_from_restart_file now returns
opm-output defined data types that clients, typically simulators, can
use to populate its own internal structures at will.
2016-06-07 08:40:38 +02:00
Jørgen Kvalsvik
1c89ba93a9 Replace WellState with data::Wells 2016-06-07 08:40:38 +02:00
Jørgen Kvalsvik
8776cc9c44 Output takes data::Solution over SimDataContainer
To break dependencies between modules, and to properly define the input
format for the output facilities, make writeTimeStep take data::Solution
over SimulationDataContainer.
2016-06-07 08:40:37 +02:00
Jørgen Kvalsvik
3a81e1bd3b writeTimeStep takes time parameters explicitly
Removes the dependency on SimulationTimerInterface, and instead expects
to get the raw values from caller.
2016-06-07 08:40:37 +02:00
Jørgen Kvalsvik
94f0dd92ed Replace SimulationTimer with time_t in writeInit
Instead of passing a massive and complex instance around, reduce
dependencies by directly passing the interesting time values to
writeInit.
2016-06-07 08:40:37 +02:00
Jørgen Kvalsvik
289021d823 Grouped tests into fewer, more elaborate cases
The tests requires some boilerplate setup and quickly became slow to
maintain and run. Rewrite so that the tests are grouped on topic instead
of immediate keyword family.
2016-05-24 10:31:14 +02:00
Jørgen Kvalsvik
d27b3db9fd Injection rate tests 2016-05-24 10:31:14 +02:00
Jørgen Kvalsvik
6cfb52ae69 Summary: Production is negative injection.
Represent simulator-provided data as production = negative injection,
and write rates accordingly. Tests updated.
2016-05-24 10:31:07 +02:00
Kjell W. Kongsvik
929e470af0 Set basename so that there is a filename to create 2016-05-02 10:07:04 +02:00
Kjell W. Kongsvik
8cc923e2b4 Use tmp area for running EclipseWriterIntegration test
Due to old files on disk test did not fail as it should have
2016-04-29 15:45:40 +02:00
Kjell W. Kongsvik
d248ef304f Added missing test file 2016-04-29 14:15:20 +02:00
Kjell W. Kongsvik
e7454e69db Remove phaseUsage parameter, get it from eclipseState 2016-04-29 14:15:20 +02:00
Kjell W. Kongsvik
db87f24ebb Revert back code so that output grid is not recreated unsafely
Readded necessary parameters for this
2016-04-29 14:15:20 +02:00
Kjell W. Kongsvik
85caa436ee Cleanup of comparisons when restoring 2016-04-29 14:15:20 +02:00
Kjell W. Kongsvik
8aa3526f82 Improved refactoring of EclipseReadWriteWellStateData 2016-04-29 14:15:20 +02:00
Kjell W. Kongsvik
35e7507f3e Refactored tests
Move 2 decks from strings to seperate files

Started to make test_writeReadRestartfile more simple
2016-04-29 14:15:20 +02:00
Kjell W. Kongsvik
bd1d8dc576 Removed parameters to EclipseWriter
Paramater::ParameterGroup& params and numCells and compressedToCartesianCellIndex
These are now stored in the IOconfig object
2016-04-29 14:15:20 +02:00
Kjell W. Kongsvik
d622f6e04b Removed compressedToCartesianCellIdx parameter
Noted that internal calculation of compressedToCartesianCellIdx should be done in EclipseGrid
2016-04-29 14:15:20 +02:00
Kjell W. Kongsvik
c6bfcef5e6 Removed numCells parameter 2016-04-29 14:15:20 +02:00
Jørgen Kvalsvik
dcdcf99758 Support and tests for history matching G-keywords 2016-04-28 16:20:03 +02:00