The UDQDefine::input_string() function will return normalized input which is
equivalent to the deck input string, but not necessarily identical. Normalizing
which might give rise to differences:
- All selectors/qualifiers in expressions like "WWCT '*'" are quoted.
- Whether to pad operators with space like "170 + FU_PAR10" or "170+FU_PAR10" is
hardcoded and independent of the space used in the input.
- Floating point numbers is output with format "%g" - no trailing zeros.
This commit switches the criterion for BASIC=4 and BASIC=5 to using
the difference between the previous and the next output time instead
of "just" the next output time. The original criteria
year % freq == 0
month % freq == 0
don't do what we want. BASIC=4 and BASIC=5 should output every
'freq' year (=4) or 'freq' month (=5) of simulated time.
This commit adds a new helper object
Opm::WriteRestartFileEvents
that identifies when a restart file output event occurs as well as
the most recent output event prior to a particular report step. We
implement this facility in terms of a dense bit vector that wastes
up to 63 bits of space. Most of the logic is devoted to finding the
most recent previous output event, of which the core routine is
counting the number of leading zero bits in a 64 bit value. We've
elected to implement this in a portable manner using binary search,
although most implementations provide efficient intrinsics for this
operation, e.g., GCC's __builtin_clzl. In C++20 we can use the new
function std::countl_zero() from <bit>.
This commit renames various data members of the *_data structures to
aid the reader who may not be intimately familiar with the details
of the analytic models. We switch the 'initial_pressure' into an
optional<double> instead of a pair<bool,double> with 'std::nullopt'
representing defaulted initial aquifer pressure values in the input
file.
We also add logic and private data members to compute/store aquifer
time constants, mass density of water, water viscosity and, in the
case of Carter-Tracy aquifers, also the influx constant 'beta'.
This centralises the requisite logic which reduces the risk of
subtle errors.
In the case of defaulted initial pressures, we support deferred
calculation of aquifer properties until the equilibrium pressure is
known. Users are then expected to assign a value to the initial
pressure members and call 'finishInitialisation()' to derive those
properties.
While here, also switch to using raw string literals instead of
concatenated and escaped literals for the embedded deck strings in
the ParserTests.
This commit adds UDA items for the GCONINJE keyword. This is in
preparation of tracking UDA status in this context. While here,
also add unit tests for the expected values of UDQ::keyword() and
UDQ::udaCode().