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.
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.
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.
By precomputing and storing the keyword-to-enum mapping, accessing and
writing to a node overhead changes from log(N) to constant, and should
behave better w.r.t. cache and memory access.
Support for the creation and output of ecl-compatible SUMMARY-section
configured files. Supports a set of Well keywords, with unit conversions
based on user request, and comes with a test suite.