If the last report step happens to be split into multiple substeps
(e.g., convergence problems or TUNING settings &c), then we will
write the RSM file for each substep which will slow down the
process. This commit explicitly ensures that we don't output the
RSM file unless it is the last substep of the final report step.
We need this in opm-simulators where we need to query the
FieldProperties associated with the TranCalculator (e.g. TRANX0). Previously,
this were listed by FieldPropertiesManager::keys() but calling
get_int_field_data with the keyword would raise an exception resulting
in a deadlock.
This commit allows passing true as an additional argument to prevent
this (it gets passed to all functions called). This allows for running
with edited transmissibilities in parallel.
This is needed for communication in the simulator. Previously,
that just used the data (std::vector), but the TranCaclulator
also needs the value_status to correctly. Hence this needs
to be communicated, too.
Previously modifications were applied directly to the field
properties. Unfortunately, for unset TRANX this resulted in
modifying 1.0 even if the simulator is calculating
transmissibilities itself. This was one of the reasons
why we got wrong results (others are in the simulator code).
Now these operations recorded in a calculator which can later be
applied to compressed arrays using apply_tran.
This commit introduces a new helper structure, RawFunctionValues,
which collects unscaled saturation function values that are needed
for vertical scaling of saturation functions using keywords such as
KRO, KRORG, KRGR, PCW
and their hysteretic and directional counterparts. We also
introduce a new helper function, getRawFunctionValues, which
extracts those values from the function tables in TableManager.
Add a set of unit tests to exercise the new feature.
In particular, fix a few instances of "signed vs. unsigned"
comparisons, one "no previous declaration for", and include the
<algorithm> header for std::find().