* Added keyword "OPERNUM" to supported keywords in Eclipse3DProperties
* Updated tests to use Eclipse3DProperties API instead of GridProperties
* Moved init sequence of title into constructor
* ThresholdPressure and SimulationConfig now tasks Deck ref instead of shared_ptr
* Removed obsolete test and unused tests that tested gridProperties
* Refactor use of TableManager. Is now a reference.
* Added non-const GridProperties.getKeyword(size_t i)
* moved region-property from EclipseState to Eclipse3DProperties
* moved initGridopts from EclipseState to Eclipse3DProperties
* made several Eclipse3DProperties methods private
* removed obsolete tests
* replaced log with throw internally in private method---is domain_error
* removed typedef in SatFuncPropertyInitializers
* postprocessors take raw pointers, not shared_ptr---these will be phased out
* fixed return reference instead of copy several places
** gridProperties<T> in Eclipse3DProperties are now references, not shared_ptr
** Eclipse3DProperties takes const Deck&, not shared_ptr
** EclipseGrid and Section are references
* Removed all references to state, need to fix initPORV
* Made TransMult return raw pointer const GridProperty over shared pointer.
* Moved getDirectionProperty and hasDirectionProperty out of API
** Removed tests as these methods are no longer public
* Moved grid properties stuff to new class
* Removed use of deck in SatfuncInitializers, moved to TableManager
* Removed shared_ptr for several members of EclipseState and 3DProperties
* Moved region-property from EclipseState to Eclipse3DProperties
* Moved initGridopts from EclipseState to Eclipse3DProperties
* Made several Eclipse3DProperties methods private
* Postprocessors take raw pointers, not shared_ptr---these will be phased out
* Fixed return reference instead of copy several places
** GridProperties<T> in Eclipse3DProperties are now references, not shared_ptr
** Eclipse3DProperties takes const Deck&, not shared_ptr
* Removed obsolete tests
The const_cast in Deck::get*UnitSystem are potentially undefined
behaviour under a series of (plausible) conditions, and are deprecated
in favour of mutable members. Removes initUnitSystem from the public
interface, as the initialisation is handled on the first getUnitSystem
anyway, cleaning up the Deck interface slightly.
Adds proper constness to the use of unit systems that don't actually
modify the internal state in any way.
By storing it as size_t we explicitly disallow negative line numbers,
and keep 0 as an error/empty/undefined location.
A small problem with this is that MessageContainer.error and friends
still accept negative numbers (often without warning) via size_t
implicit conversion and wrap-around.
For more transactional behaviour and to support MessageContainer in
favour of opm-log, this method now returns an enum describing how the
error should be handled, rather than throwing or no-oping. Throwing is
preserved if ParseContext is configured to do so.
While the implementation is a simple alias to
std::vector<Message>::const_iterator, it enablese generic lookup of the
iterator type at compile time, and enables us to effortlessly change the
underlying implementation later.
Some phenomenons can be configured as error, warning or debug output,
and is not necessarily known in advanced by the entity adding a message.
To facilite adding a message with runtime-defined warning level, the add
method is supported.
By supporting operator bool() we get the same existence checking
capabilities as the unique_ptr implementations, without the hurdles of
non-copyability and manual heap allocation.
The general loop through all raw records should be based on the iterator
interface of the RawKeyword, but to resolve INCLUDE statements we have
implemented a special case method to get the first record.
Have renamed the OpmLoadDeck test program to the working name opmi - Opm
Inspector. Currently the opmi executable will only load a deck and
create a EclipseState instance, but the plan is to extend this
executable to be a general Eclipse deck inspector, e.g.
opmi --wells CASE.DATA
Could the list the wells and so on.
Changes the implementation of numbers parsing from std::atoi/f to
std::strtod/l. These support setting the optional end-of-string pointer
which are used to determine if a parsing was successful or not. This has
the nice side effect of *greatly* simplifying the logic, at the expense
of some C-style details.
Tests added to verify that the different edge cases are handled
properly.
Since RawRecords now has automatic storage, managed by std::list,
offering iterators is feasible. The random access
RawKeyword::getRecord's real use was accessing the records in order,
which now is handled via iterators.
By changing the underlying storage of RawKeyword to std::list, we ensure
that the RawRecords aren't reallocated and moved, preserving the
validity of string_view's. This changes the access complexity of
RawRecord from O(1) to O(n).