Commit 6ba9dc086 (PR #5626) moved the balance sheet report output
logic ahead of the timestep. As a consequence, the output module's
'inplace_' and 'initialInplace_' data members must be fully
initialised the first time we call 'writeReports()' if the run
requests balance sheet output.
This commit initialises those objects by calling calc_inplace() from
EclWriter<>::endRestart(). Doing so restores the behaviour from
before PR #5626. Note, however, that using this value for
'initialInplace_' is incorrect as the simulator then, in a restarted
run, will calculate recovery factors based on the fluid distribution
at the restart time instead of at the start of the base run.
Nevertheless this is, as alluded to earlier, how the simulator has
always performed. The behaviour is just a little more explicit now.
In particular,
- Split some long lines
- Mark objects 'const' where possible
- Reduce scope of objects
- Add braces to single statement control structures
- Prefer pre-increment
- Prefer type deduction for induction variables
-Only output or restart solution tracers for gas/oil tracers with DISGAS/VAPOIL enabled (no solution tracers in water phase!).
-Initial tracers (free/solution) will be set to zero initially if TBLK/TVDP is not given.
- Do not calculate mass transfer between free and solution tracers if it is not necessary.
-Calculate well rates using updated tracer concentrations
This commit implements the parallel version of
EclipseState::computeFipRegionStatistics()
which computes a FIPRegionStatistics object for the current run's
fluid-in-place regions. The object construction uses an MPI-aware
reduction process to compute the maximum region IDs across all MPI
ranks.
While here, also unconditionally form the statistics object as part
of the EclWriter's constructor to ensure that all ranks participate
in the process. The initial approach of constructing the object on
first use is not robust in parallel. We may however wish to compute
these statistics only when needed. If so, that will be the subject
of follow-up work.
In the current approach, the full list of summary vectors,
especially those that are defined at the region level, is not known
until we've processed all UDQ and/or ACTIONX definitions. As a
quick solution to this, switch to using the 'SummaryConfig' object
that's defined in the EclipseIO container instead of the object that
gets constructed when reading the input files.
It is likely that we will have to rethink and refactor this
construction process later.