This is a follow up of the fix in #5414.
The comment said that the ordering of the compressed index of cells is
coherent with the cartesian index. THis is not the case in parallel
where cells in the overlap/ghost region might be ordered last (default).
This PR switches to calling the SummaryState constructor which is
aware of the value of undefined UDQs (OPM/opm-common#4052) directly.
While here, also sort headers, split some long lines, and prefer
initialisation lists to constructor body assignments.
Commit 0aaa69c6e (PR #5330) was a little too eager in its effort to
handle UDQ ASSIGN operations after action processing[%]. In
particular, the assignments, which alter the internal structures of
the SummaryState and UDQState objects, would happen prior to writing
summary files. In turn, this would make it appear as if the
assignment happened too early. This commit defers UDQ assignments
triggered by action processing until FlowProblem<>::endEpisode() for
two reasons
1. The problem originally addressed in 0aaa69c6e only presented
when the assignment was triggered on the final time step of an
episode (report step), so handling this situation here is a
more targeted approach.
2. Member function FlowProblem<>::endEpisode() is called after we
write the summary file output so any alterations to the
internal structures of the SummaryState will not be visible in
the summary output until the next time step. This is the
expected behaviour.
[%] Insufficient testing by: [at]bska.
If an action block happens to run a UDQ ASSIGN operation and,
furthermore, happens to run at the last time step of an episode then
the "clear pending assignments" behaviour of the ScheduleState copy
constructor leads to not performing the UDQ assignment at all. This
commit works around this problem by invoking the action handler's
UDQ assignment function after processing all active action blocks.
The underlying problem has been present since at least Pull Request
OPM/opm-common#3587 which introduced the "clear pending assignments"
behaviour of ScheduleState's copy constructor.
In particular, be consistent about four-space indent levels and add
braces to a number of single-statement control blocks. Add a few
blank lines for readability.
While here, also mark a number of objects as 'const'.
from AluGridVanguard and CpGridVanguard.
they exist is becaluse of typo in the function name. There is another
releaseGlobalTransmissibilities() function actually gets used.
which does not have effects, which was suggested by Håkon Hægland.
And also removing the following member variables from
FlowGenericProblem because they are not in use anymore.
krnumx_, krnumy_, krnumz_;
imbnumx_, imbnumy_, imbnumz_;
This commit includes the fraction of pore-volume whose CNV targets
are violated as a new per-iteration quantity in the INFOITER file
(--output-extra-convergence-info=iteration), with the column header
"CnvErrPvFrac". We collect the values which are already calculated
in
BlackoilModel<>::getReservoirConvergence()
and store these as a pair of numerator and denominator in the
ConvergenceReport class. Note that we need both the numerator and
the denominator in order to aggregate contributions from multiple
ranks.
While here, also make a few more objects 'const' and calculate
column widths directly instead of the maximum number of characters
in writeConvergenceHeader().