This commit makes the 'groupData()' function return a
map<string, Opm::data::GroupData>
object instead of a
map<string, Opm::data::GroupConstraints>
object. The 'GroupData' structure adds a level of indirection to
the current per-group summary quantities that are directly assigned
by the simulator. While here, also move the assignment of the
current group constraints/control values out to a separate helper
to reduce the body of the per-group loop in 'groupData()'.
This is in preparation of adding support for reporting group-level
production/injection guiderates (Gx[IP]GR) to the summary file.
This commit makes the constructor PressureInverseOperator that
accepts a Dune::OwnerOverlapCopyCommunication<> object contingent on
having MPI. The type does not exist otherwise.
That way we can use the same code for both the 'writeOutput' and
the 'evalSummaryState' member functions. While here, also change
the declared types of 'wellData' and 'groupData' to 'auto' in
preparation of API updates for collecting group- and well level
guiderate data.
Finally, apply 'const' where possible.
Also introduce new class WellModelAsLinearOperator making a well model
into an actual Dune::LinearOperator, this prevents the TypeTag dependent
type from leaking into the type of the WellModelMatrixAdapter instantiation.
As a side benefit, the adapter classes can now adapt (i.e. combine with a
matrix operator) any linear operator.
A resubmission of commit bb20804 in PR #2403 and PR #2442 to work with the
current master.
Continues the work in #2619 and #2631 to refactor main simulation loop in
flow to work with the Python bindings.
The run() method in SimulatorFullyImplicitBlackoilEbos.hpp is refactored
in preparation for the implementation of a Python step() function in a
later commit. Currently run() is called from runSimulatorInitOrRun() in
FlowMainEbos.hpp using the runSimulatorRunCallback_(). Later, there
will be other callbacks like runSimulatorStepInitCallback_(), and
runSimulatorStepCallback_(), that will need to call different parts of
the code in run(). The run() function is thus refactored into run(),
runInit(), runStep(), and runLastStep(). Also, some of the local
variables in run() have to be made persistent between calls to
runStep(), this applies to variables report, solverTimer, totalTimer,
and adaptiveTimeStepping, which are made private class variables.