while this makes sense to do in general, it causes issues
when reconstructing after deserialization.
we have dimensions with '/' and '*' in the name that was
constructed through newComposite.
This commit ensures that we do not create RFT output files unless
the simulation model specifically requests such output (e.g.,
through keywords WRFT or WRFTPLT). Notably, the OutputStream::RFT
constructor will also create the file so we must take care not to
form an object of this type unless actually needed.
Generally, this commit captures more of the surrounding context of
calls to the updateRFT() and updatePLT() member functions. We need
this additional context in order to handle the conflicting semantics
of output requests WRFT and WRFTPLT:FOPN. The former generates RFT
output when the well opens if this event does not happen earlier in
the simulation schedule than the output request. Otherwise no RFT
data is emitted. The latter outputs RFT data at request time if
well opens no later than the request; otherwise at well-open time.
To this end, switch the well_open_rft_name data member from an
unordered_set of well names into an unordered_map from well names to
RFT output request times. With this additional information we can
use well_open_rft_time to infer the appropriate response to whether
or not to activate RFT output at well open time. Moreover, we now
guarantee that no RFT output is ever activated before the first RFT
output request.
Switching the type of the well_open_rft_name data member also begets
an API update to the serialization related RFTConfig constructor and
to the return type of RFTConfig::wellOpenRftName().
We furthermore switch to caching the first RFT output event in a new
scalar data member, first_rft_event. This caching, coupled with the
additional calling context mentioned earlier, means we are now able
to report a high-fidelity, constant time answer to the
RFTConfig::firstRFTOutput()
request. This, in turn, is very useful for the RFT output code.
Finally, we also add a couple of new, private member functions to
simplify updating first_rft_event depending on context.
As part of this update, member function
RFTConfig::setWellOpenRFT(report_step)
will now use the minimum of all 'report_step' values to support the
WRFT keyword being specified more than once.
Finally, add a set of unit tests to exercise the various RFT output
request combinations.
While here, also switch to using unordered_map::find() and emplace()
where possible to limit repeated look-up of the same keys.
This commit ensures that we record a "well open" event whenever
Schedule::updateWellStatus
switches a well's status to OPEN. We need this information in order
to correctly output RFT data configured with WRFT or the FOPN option
of keyword WRFTPLT. Previously, we recorded such events only in the
context of the WELOPEN keyword.