Note that this keyword is pretty quirky. Depending on whether
E100/E300 considers it for MINPV handling or not, this patch is also
not going to cut it. (After this patch, OPM will consider MULTREGP for
the MINPV handling. Could somebody with access to E check?)
This commit adds conversion factors for the ECL LAB unit
conventions--notably Atmospheres for pressures, Hours for time,
Grams for mass, and cubic centimetres for volumes.
The hand-written number parser functions implemented using strtod and
friends were rather slow (profiling indicates that typically 30% of the
program is spent inside of strtod internals). By using
boost::spirit::qi, which we already depend on through boost-filesystem
and others this portion typically seem to be reduced to 20% (via
instruction count) and with somewhat better cache performance.
Rudimentary measuring indicates ~15% speedup overall.
Additionally, the intention is a lot clearer this way, so readability
received a boost. Compilation time of StarToken goes through the roof.
it is parsed and put into the deck, but it is not internalized in any
way. (Note that, given that this keyword is quite simple, adding
sophisticated code to absorb it into EclipseState would be overkill,
in my not so humble opinion.)
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.
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.
Implementing these checks as function objects improves performance
slightly (5% or so according to my measurements), probably due to the
functions being inlined rather than reduced to function pointers.
Profiling indicates the size-check isn't hoisted properly. In this case,
manually hoising the loop invariant doesn't negatively impact clarity
nor give any more noise, and slightly improves performance.
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.
Rather than doing add-item-check-duplicates per DeckItem added to a
record, construct all the items at once, then pass them in full to the
DeckRecord object. The DeckRecord object still check for duplicate
names, but with lower complexity and cost.